mirror of
https://github.com/chenxiaolong/avbroot.git
synced 2026-07-03 14:05:11 +02:00
c974ab5ec3
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
25 lines
509 B
Rust
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();
|
|
}
|