d240151f8c
* 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.
15 lines
276 B
Rust
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
|
|
);
|
|
}
|
|
});
|