Skip to content

Commit

Permalink
Merge pull request #165 from chenxiaolong/cpio
Browse files Browse the repository at this point in the history
Add fuzzer for cpio
  • Loading branch information
chenxiaolong authored Sep 28, 2023
2 parents 36dcbe0 + 0aba185 commit 96fb8dd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
Binary file added fuzz/hfuzz_workspace/cpio/input/test.cpio
Binary file not shown.
21 changes: 21 additions & 0 deletions fuzz/src/bin/cpio.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#[cfg(not(windows))]
mod fuzz {
use std::io::Cursor;

use avbroot::format::cpio;
use honggfuzz::fuzz;

pub fn main() {
loop {
fuzz!(|data: &[u8]| {
let reader = Cursor::new(data);
let _ = cpio::load(reader, true);
});
}
}
}

fn main() {
#[cfg(not(windows))]
fuzz::main();
}

0 comments on commit 96fb8dd

Please sign in to comment.