grass/fuzz/fuzz_targets/from_string_parsing.rs
Midas Lambrichts d240151f8c
Add fuzzing (#36)
* Add fuzzing

Fuzzing can be useful to find crashes on random input.
Running this for a short while should already result in a crash, proving
it's usefulness.
2020-08-20 08:52:42 -04:00

15 lines
276 B
Rust

#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
if let Ok(s) = std::str::from_utf8(data) {
let options = grass::Options::default();
let _ = grass::from_string(
s.to_owned(),
&options
);
}
});