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

Remove casts to size_t in Rust code #4

Closed
briansmith opened this issue Aug 30, 2015 · 2 comments
Closed

Remove casts to size_t in Rust code #4

briansmith opened this issue Aug 30, 2015 · 2 comments

Comments

@briansmith
Copy link
Owner

See rust-lang/rust/#28096.

There are some casts like digest.len() as libc::size_t that are potentially truncating and thus unsafe. At the same time, the comments in the code questioning the safety of such casts need to be removed.

This will have to wait for a higher-versioned released of the libc crate with rust-lang/rust#28096 merged into it.

@briansmith
Copy link
Owner Author

This depends on rust-lang/rust#28779. That was merged to the Rust beta branch in rust-lang/rust#29112 so we can probably do this soon.

@briansmith
Copy link
Owner Author

Fixed in 377f611 by dropping the dependency on the libc crate and defining our own size_t type: ring::c::size_t.

tomaka pushed a commit to tomaka/ring that referenced this issue Jul 4, 2018
backwardn pushed a commit to backwardn/ring that referenced this issue Nov 20, 2019
Fix generateMultiHash write data to source data slice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant