add afl fuzz target

This commit is contained in:
Noah Hellman 2023-02-01 17:44:42 +01:00
parent 78987f7ba3
commit 28c2bfbe8c
6 changed files with 367 additions and 0 deletions

11
tests/afl/src/gen.rs Normal file
View file

@ -0,0 +1,11 @@
use afl::fuzz;
fn main() {
fuzz!(|data: &[u8]| {
if let Ok(s) = std::str::from_utf8(data) {
let p = jotdown::Parser::new(s);
let mut output = String::new();
jotdown::html::push(p, &mut output);
}
});
}