-
Notifications
You must be signed in to change notification settings - Fork 144
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
out-of-bounds panic in utils::expand_pass #222
Comments
Ah, I think this is what makes all the difference:
So much for "if it compiles, it works". |
I've fixed the fuzzing harness in #220 but the panic still stands. |
We'll need to rewrite color handling, it's a mess. The 56×1 image with RGBA/2bit has an unexpanded length of 56 bytes but the expansion pass wants to exand each channel to 8bits for quadruple the data. For some reason, It doesn't not appear to cause an issue in non-interlaced images because here we simply ignore the additional data. |
Refresh fuzzing corpus again following the fix of #222
thread '<unnamed>' panicked at 'index out of bounds: the len is 56 but the index is 56', png-0.16.5/src/utils.rs:248:17
Sample file triggering the panic: mysterious-oob-crash
The coolest thing about this is that this bug is not reproducible with png's current cargo-fuzz fuzzing harness for decoding. I get the panic only with the following code:
Backtrace:
The text was updated successfully, but these errors were encountered: