muss/interpreter/fuzz/fuzz_targets/faye_fuzz.rs

21 lines
600 B
Rust
Raw Normal View History

#![no_main]
#[macro_use] extern crate libfuzzer_sys;
2022-07-02 01:40:12 +01:00
extern crate muss_interpreter;
fuzz_target!(|data: &[u8]| {
if let Ok(s) = std::str::from_utf8(data) {
print!("len:{},data:{}\n", data.len(), s)
} else {
print!("len:{},data:<non-ut8>,", data.len());
}
let mut cursor = std::io::Cursor::new(data);
2022-07-02 01:40:12 +01:00
let interpreter = muss_interpreter::Interpreter::with_stream(&mut cursor);
for item in interpreter {
match item {
Err(e) => print!("err:{},", e),
2022-07-01 21:20:52 +01:00
Ok(_i) => {},//print!("item:{},", i),
}
}
println!("done.");
});