diff --git a/fuzz/fuzz_targets/fuzz_write.rs b/fuzz/fuzz_targets/fuzz_write.rs index 104c139a..a13d9b06 100644 --- a/fuzz/fuzz_targets/fuzz_write.rs +++ b/fuzz/fuzz_targets/fuzz_write.rs @@ -104,12 +104,13 @@ fn do_operation(writer: &mut zip_next::ZipWriter, FileOperation::WriteLarge {file, mut options} => { options = options.large_file(true); writer.start_file(file.name.to_owned(), options)?; - let written: usize = 0; + let mut written: usize = 0; while written < LARGE_FILE_BUF_SIZE { for chunk in &file.large_contents { let chunk: Vec = chunk.to_owned().into_iter() .flat_map(RepeatedBytes::into_iter) .collect(); + written += chunk.len(); writer.write_all(chunk.as_slice())?; } }