Skip to content

Commit

Permalink
Add support for multiple AFL flag arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
louismerlin committed Jan 31, 2024
1 parent 1793f05 commit 0fdca67
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/bin/cargo-ziggy/fuzz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,12 +365,12 @@ impl Fuzz {
mutation_option,
&timeout_option_afl,
&dictionary_option,
&self.afl_flags.clone().unwrap_or_default(),
&format!("./target/afl/debug/{}", self.target),
]
.iter()
.filter(|a| a != &&""),
)
.args(self.afl_flags.clone())
.arg(format!("./target/afl/debug/{}", self.target))
.env("AFL_AUTORESUME", "1")
.env("AFL_TESTCACHE_SIZE", "100")
.env("AFL_FAST_CAL", "1")
Expand Down
2 changes: 1 addition & 1 deletion src/bin/cargo-ziggy/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ pub struct Fuzz {

/// Pass flags to AFL++ directly
#[clap(short, long)]
afl_flags: Option<String>,
afl_flags: Vec<String>,
}

#[derive(Args)]
Expand Down

0 comments on commit 0fdca67

Please sign in to comment.