Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(stream): Don't break out of UTF8 character part-way #158

Merged
merged 2 commits into from
Jan 12, 2024

Conversation

epage
Copy link
Collaborator

@epage epage commented Jan 12, 2024

This fixes a soundness issue where we create invalid UTF-8 data and then
do a str::from_unchecked on release builds.

This ensures we ignore up-to the start of UTF-8 sequences and not
mid-way through.

We need to find more ways to prop test this to help catch issues like this.

This supersedes #157

Fixes #156

This fixes a soundness issue where we create invalid UTF-8 data and then
do a `str::from_unchecked` on release builds.

This ensures we ignore up-to the start of UTF-8 sequences and not
mid-way through.

Fixes rust-cli#156
@epage epage merged commit 6822aa4 into rust-cli:main Jan 12, 2024
13 checks passed
@epage epage deleted the sound branch January 12, 2024 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unsoundness in crate anstream
1 participant