Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Pr0methean committed Feb 29, 2024
1 parent 5f6546d commit 779c9d3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fuzz/fuzz_targets/fuzz_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ fn decompress_all(data: &[u8]) -> Result<(), Box<dyn std::error::Error>> {
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())?;
Expand Down

0 comments on commit 779c9d3

Please sign in to comment.