diff --git a/fuzz/fuzz_targets/fuzz_read.rs b/fuzz/fuzz_targets/fuzz_read.rs index e0d2c7f8..198e8d9d 100644 --- a/fuzz/fuzz_targets/fuzz_read.rs +++ b/fuzz/fuzz_targets/fuzz_read.rs @@ -9,6 +9,7 @@ fn decompress_all(data: &[u8]) -> Result<(), Box> { let mut zip = zip_next::ZipArchive::new(reader)?; for i in 0..zip.len() { + let file = zip.by_index(i)?; let expected_bytes = file.size().min(MAX_BYTES_TO_READ); let file = zip.by_index(i)?.take(MAX_BYTES_TO_READ); std::io::copy(&mut file, &mut std::io::sink())?;