Skip to content

Commit 4043bb1

Browse files
pocopepesylvestre
authored andcommitted
skip --help args in fuzz_cmp_args since it causes process exit
1 parent d11f672 commit 4043bb1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

fuzz/fuzz_targets/fuzz_cmp_args.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ fn os(s: &str) -> OsString {
1111
}
1212

1313
fuzz_target!(|x: Vec<OsString>| -> Corpus {
14+
if x.iter().any(|a| a == "--help") {
15+
return Corpus::Reject;
16+
}
1417
if x.len() > 6 {
1518
// Make sure we try to parse an option when we get longer args. x[0] will be
1619
// the executable name.

0 commit comments

Comments
 (0)