afl: gen -> parse, parse only
This commit is contained in:
parent
648a6dbef2
commit
2606e2f4fc
4 changed files with 12 additions and 16 deletions
|
@ -8,5 +8,5 @@ afl = "0.11"
|
|||
jotdown = { path = "../../", features = ["deterministic"] }
|
||||
|
||||
[[bin]]
|
||||
name = "gen"
|
||||
path = "src/gen.rs"
|
||||
name = "parse"
|
||||
path = "src/parse.rs"
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
use afl::fuzz;
|
||||
|
||||
use jotdown::Render;
|
||||
|
||||
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::Renderer.push(p, &mut output).unwrap();
|
||||
}
|
||||
});
|
||||
}
|
9
tests/afl/src/parse.rs
Normal file
9
tests/afl/src/parse.rs
Normal file
|
@ -0,0 +1,9 @@
|
|||
use afl::fuzz;
|
||||
|
||||
fn main() {
|
||||
fuzz!(|data: &[u8]| {
|
||||
if let Ok(s) = std::str::from_utf8(data) {
|
||||
jotdown::Parser::new(s).last().unwrap();
|
||||
}
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue