-
Notifications
You must be signed in to change notification settings - Fork 50
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
Crashes 'index 15536 out of range for slice of length 15533' #13
Comments
Thanks for the report! A bit more information on the data being decompressed and/or full logs would be appreciated. As is, there is even no "out of range for slice" from title in the logs. If you can run this under valgrind and copy-paste output, that would be very helpful. |
It's possible that this is related to this. |
Fixes rust-lang/flate2-rs#142, and possibly #13 as well.
@sanmai-NL Is this fixed by 0bd8851? |
@oyvindln is miniz-sys used by default by some widespread libraries? I think I’ve seen several index out of bounds panics during decompression of various things recently. For example, this one: https://ci.appveyor.com/project/DarkEld3r/exonum-sodiumoxide/build/1.0.15/job/rrcxdvl9q5vryrfl#L220 |
Yep, it's used by zip-rs by default now: zip-rs/zip-old@50b57f4 Might be worthwhile to bump the min version of miniz in flate2 & zip-rs then! |
I've just hit this issue on the updated crate.
Unfortunately, the segfault took out my error handling, so I have no idea where I hit the problem.. I'm decompressing a known set of non-private files, so I will be able to find it again, assuming it's deterministic. Give me a few tens of CPU hours to get back to where I was... |
It looks like it's a different OOB issue than the one that was fixed in 0bd8851. It's possible the EDIT: Actually the execution shouldn't even get there if there isn't enough space, not sure what's happening then. |
@FauxFaux Which way was inflate called when you hit this panic, was it through flate2, which uses wrapping output buffers, or using decompress_to_vec, which uses a non-wrapping buffer? |
The comment above is through flate2. The same file fails in #19 with |
@oyvindln: I haven’t encountered errors since your fix. 🙂 |
Awesome, marking this as closed then. |
Fixes rust-lang/flate2-rs#142, and possibly #13 as well.
The text was updated successfully, but these errors were encountered: