mirror of
https://github.com/chenxiaolong/avbroot.git
synced 2026-07-03 14:05:11 +02:00
5b22d7b603
This initially includes fuzzers for the AVB and boot image parsers. The initial input corpus are the same test files we use for the round trip tests. Issue: #160 Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
22 lines
418 B
Rust
22 lines
418 B
Rust
#[cfg(not(windows))]
|
|
mod fuzz {
|
|
use std::io::Cursor;
|
|
|
|
use avbroot::{format::bootimage::BootImage, stream::FromReader};
|
|
use honggfuzz::fuzz;
|
|
|
|
pub fn main() {
|
|
loop {
|
|
fuzz!(|data: &[u8]| {
|
|
let reader = Cursor::new(data);
|
|
let _ = BootImage::from_reader(reader);
|
|
});
|
|
}
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
#[cfg(not(windows))]
|
|
fuzz::main();
|
|
}
|