Skip to content

Commit

Permalink
fuzz: remove input limit
Browse files Browse the repository at this point in the history
While working on https://github.com/djc/askama/pull/862 fuzz_parser was
crashing and failing oss-fuzz build_checks. so a limit of 500 was placed, this pr removes that.
  • Loading branch information
manunio authored and djc committed Sep 18, 2023
1 parent 8f3140a commit 2ef2b9d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions askama_parser/fuzz/fuzz_targets/fuzz_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ use std::str;

fuzz_target!(|data: &[u8]| {
// fuzzed code goes here
if data.len() < 500 {
if let Ok(data) = str::from_utf8(data) {
if let Ok(_) = Ast::from_str(data, &Syntax::default()) {}
}
if let Ok(data) = str::from_utf8(data) {
if let Ok(_) = Ast::from_str(data, &Syntax::default()) {}
}
});

0 comments on commit 2ef2b9d

Please sign in to comment.