rust-metaflac
rust-metaflac copied to clipboard
Crash when attempting to read from malformed input data
Hi,
I ran cargo-fuzz on this project (master branch, commit 292a92d6ca3725cef19c07f915885664d49ca0f6
) and uncovered a crash when reading malformed data using Tag::read_from
Attached is the fuzz-generated input that produced the crash, and a minimised (8-byte) test case.
The error produced by the minimised test case: thread '<unnamed>' panicked at 'range end index 2 out of range for slice of length 0', /path/to/rust-metaflac/src/block.rs:240:34