Skip to content

Conversation

@lf-
Copy link
Contributor

@lf- lf- commented Jun 7, 2021

Previously, unchecked user input bytes were passed into
str::from_utf8_unchecked, which was unsound as it was within a safe
function. It's been revised to check the user input and fail if there's
invalid input.

For a file with fun contents of broken UTF-8 to test with, see https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt

Previously, unchecked user input bytes were passed into
`str::from_utf8_unchecked`, which is unsound as it was within a safe
function. It's been revised to check the user input and fail if there's
invalid input.
@mgattozzi mgattozzi merged commit bb661f2 into rust-lang:master Jun 7, 2021
@mgattozzi
Copy link
Contributor

Thanks! Must of missed it when reviewing other's prs

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.

2 participants