Skip to content

Commit

Permalink
Revert "chore: Use panic! rather than abort to ensure the fuzz harnes…
Browse files Browse the repository at this point in the history
…s can process the failure"

This reverts commit 0011370.
  • Loading branch information
Pr0methean committed May 6, 2024
1 parent 0011370 commit 30ef662
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fuzz/fuzz_targets/fuzz_write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use arbitrary::Arbitrary;
use libfuzzer_sys::fuzz_target;
use replace_with::replace_with;
use replace_with::replace_with_or_abort;
use std::io::{Cursor, Read, Seek, Write};
use std::path::PathBuf;

Expand Down Expand Up @@ -83,9 +83,7 @@ where
}
if operation.reopen {
let old_comment = writer.get_raw_comment().to_owned();
replace_with(writer, || {
panic!("Failed to reopen writer");
}, |old_writer: zip::ZipWriter<T>| {
replace_with_or_abort(writer, |old_writer: zip::ZipWriter<T>| {
let new_writer =
zip::ZipWriter::new_append(old_writer.finish().unwrap()).unwrap();
assert_eq!(&old_comment, new_writer.get_raw_comment());
Expand Down

0 comments on commit 30ef662

Please sign in to comment.