Files
avbroot/fuzz/src/bin/bootimage.rs
T
2024-09-22 14:58:01 -04:00

25 lines
509 B
Rust

// SPDX-FileCopyrightText: 2023 Andrew Gunnerson
// SPDX-License-Identifier: GPL-3.0-only
#[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();
}