afl: mv parse target impl to lib
This commit is contained in:
parent
2606e2f4fc
commit
3e56903885
2 changed files with 6 additions and 7 deletions
5
tests/afl/src/lib.rs
Normal file
5
tests/afl/src/lib.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
pub fn parse(data: &[u8]) {
|
||||
if let Ok(s) = std::str::from_utf8(data) {
|
||||
jotdown::Parser::new(s).last();
|
||||
}
|
||||
}
|
|
@ -1,9 +1,3 @@
|
|||
use afl::fuzz;
|
||||
|
||||
fn main() {
|
||||
fuzz!(|data: &[u8]| {
|
||||
if let Ok(s) = std::str::from_utf8(data) {
|
||||
jotdown::Parser::new(s).last().unwrap();
|
||||
}
|
||||
});
|
||||
afl::fuzz!(|data: &[u8]| { jotdown_afl::parse(data) });
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue