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 realpath and strerror_r to handle uninitialized buffers. #143

Merged
merged 2 commits into from
Nov 8, 2022

Conversation

sunfishcode
Copy link
Owner

Use copy_nonoverlapping instead of copy_from_slice in a few places to avoid creating Rust slices from buffers which may be uninitialized, which has UB.

Use `copy_nonoverlapping` instead of `copy_from_slice` in a few places
to avoid creating Rust slices from buffers which may be uninitialized,
which has UB.
@sunfishcode
Copy link
Owner Author

I've now added patches fixing read and friends.

@sunfishcode
Copy link
Owner Author

I've now added patches fixing read and friends.

Fixes #142.

@sunfishcode sunfishcode merged commit c2aac4c into main Nov 8, 2022
@sunfishcode sunfishcode deleted the sunfishcode/copy-nonoverlapping branch November 8, 2022 01:56
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.

1 participant