Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: decrease the call limit in fuzzer #690

Merged
merged 1 commit into from Aug 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion meta/fuzz/fuzz_targets/parser.rs
Expand Up @@ -8,7 +8,7 @@ use std::convert::TryInto;

fuzz_target!(|data: &[u8]| {
if let Ok(s) = std::str::from_utf8(data) {
pest::set_call_limit(Some(25_000usize.try_into().unwrap()));
pest::set_call_limit(Some(5_000usize.try_into().unwrap()));
let _ = pest_meta::parser::parse(pest_meta::parser::Rule::grammar_rules, s);
}
});
3 changes: 3 additions & 0 deletions meta/resources/test/fuzzsample5.grammar
@@ -0,0 +1,3 @@
/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*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/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*#*/
/*#*/
/* /*:/*
9 changes: 8 additions & 1 deletion meta/src/parser.rs
Expand Up @@ -1522,8 +1522,12 @@ mod tests {
env!("CARGO_MANIFEST_DIR"),
"/resources/test/fuzzsample4.grammar"
));
let sample5 = include_str!(concat!(
env!("CARGO_MANIFEST_DIR"),
"/resources/test/fuzzsample5.grammar"
));
const ERROR: &str = "call limit reached";
pest::set_call_limit(Some(25_000usize.try_into().unwrap()));
pest::set_call_limit(Some(5_000usize.try_into().unwrap()));
let s1 = crate::parser::parse(crate::parser::Rule::grammar_rules, sample1);
assert!(s1.is_err());
assert_eq!(s1.unwrap_err().variant.message(), ERROR);
Expand All @@ -1536,5 +1540,8 @@ mod tests {
let s4 = crate::parser::parse(crate::parser::Rule::grammar_rules, sample4);
assert!(s4.is_err());
assert_eq!(s4.unwrap_err().variant.message(), ERROR);
let s5 = crate::parser::parse(crate::parser::Rule::grammar_rules, sample5);
assert!(s5.is_err());
assert_eq!(s5.unwrap_err().variant.message(), ERROR);
}
}