I'm using this library to detect valid jpeg images for generating an afl-rs logo, basically fuzzing whether an input stream decodes or not. While doing this I came across one image that passed the fuzzer in release mode, but then panicked when I tried loading in debug mode, testing with the provided decode example gives the same result:
$ cargo run --release --example decode -- crash.jpg
Finished release [optimized] target(s) in 0.0 secs
Running `target/release/examples/decode crash.jpg`
$ cargo run --example decode -- crash.jpg
Finished debug [unoptimized + debuginfo] target(s) in 0.0 secs
Running `target/debug/examples/decode crash.jpg`
thread 'main' panicked at 'attempt to add with overflow', src/decoder.rs:551
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: Process didn't exit successfully: `target/debug/examples/decode crash.jpg` (exit code: 101)
This file does load (albeit with different output) in Preview and Safari.
I'm using this library to detect valid jpeg images for generating an afl-rs logo, basically fuzzing whether an input stream decodes or not. While doing this I came across one image that passed the fuzzer in release mode, but then panicked when I tried loading in debug mode, testing with the provided
decode
example gives the same result:This file does load (albeit with different output) in Preview and Safari.