From 779c9d38fca914bedd418055837faa1e7054af19 Mon Sep 17 00:00:00 2001 From: Chris Hennick Date: Thu, 29 Feb 2024 12:45:49 -0800 Subject: [PATCH] Bug fix --- fuzz/fuzz_targets/fuzz_read.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/fuzz/fuzz_targets/fuzz_read.rs b/fuzz/fuzz_targets/fuzz_read.rs index e0d2c7f8c..198e8d9d5 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())?;