Skip to content

Commit c753e84

Browse files
committed
make sure the buffer is large enough to store the input
1 parent 2b4dc78 commit c753e84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fuzz/fuzz_targets/compress.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fuzz_target!(|data: String| {
2222

2323
deflated.truncate(length as usize);
2424

25-
let mut output = [0u8; 1 << 10];
25+
let mut output = vec![0u8; data.len()];
2626
let config = zlib_rs::inflate::InflateConfig { window_bits: 15 };
2727
let (output, error) = zlib_rs::inflate::uncompress_slice(&mut output, &deflated, config);
2828
assert_eq!(ReturnCode::Ok, error);

0 commit comments

Comments
 (0)