-
Notifications
You must be signed in to change notification settings - Fork 10
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
Audit miniz_oxide #2
Comments
I've started doing that, the crate maintainer then stepped up and killed off most of the unsafe code by themselves. Critical fixes: Unsafe usage reduction: Still TODO:
|
The core crate now forbids unsafe code: Frommi/miniz_oxide#56 Still TODO:
|
flate2 now uses miniz_oxide directly through safe functions. Avoiding zero-initialization of buffers seem to be a common use of unsafe in general, so maybe it would be worth looking into some best practices or ways to do it safely. As for Frommi/miniz_oxide#49 , I think that would only really have been an issue when using it from C, and calling deflate on a stream initialized with inflate, though I could be wrong. |
flate2 code such as this can be easily refactored into safe code: The outer function accepts the output buffer as Exposure of uninitialized memory can be easily avoided by passing the |
|
|
https://crates.io/crates/miniz_oxide
DEFLATE encoder/decoder. 5000 downloads/day, plenty of unsafe blocks, exposed to untrusted data from the network through
reqwest
😱Tracking issues on
miniz_oxide
side:Frommi/miniz_oxide#16
Frommi/miniz_oxide#52
Frommi/miniz_oxide#53
The text was updated successfully, but these errors were encountered: