Add fuzzer for cpio

Issue: #160

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
This commit is contained in:
Andrew Gunnerson
2023-09-27 23:18:47 -04:00
parent 36dcbe092f
commit 0aba185c85
2 changed files with 21 additions and 0 deletions
Binary file not shown.
+21
View File
@@ -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();
}