Panic in `bug` when parsing malformed file
5225225 opened this issue · comments
#[test]
fn test_bug() {
let input = b"\x04\x04\x04\x05:\x1az*\xfc\x06\x01\x90\x01\x06\x01";
let mut decoder = Decoder::new(&input[..]);
let result = io::copy(&mut decoder, &mut io::sink());
}
thread 'deflate::decode::tests::test_bug' panicked at 'bug', src/huffman.rs:124:43
Thank you for creating this issue.
I'll start investigating this problem within a week.
BTW, there are multiple "Decoder" structs in libflate
( https://docs.rs/libflate/latest/libflate/?search=decoder ). So could you give me the module name of the above Decoder
struct?
Ah, my bad. I put that test in deflate/decode.rs
, it's the DEFLATE decoder.
Thank you!
Fixed in #65. Thanks again for reporting this problem.