Skip to content

Commit

Permalink
fix(build): fix hfuzz_build_args parsing
Browse files Browse the repository at this point in the history
The code searches hfuzz_build_args for any tokens matching "--profile",
but it currently does this in a way that fails if any of the contained
tokens are shorter than 9 characters. Simplify the check.
  • Loading branch information
Mira Ressel committed Jun 14, 2023
1 parent c5805fa commit b7d4d99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bin/cargo-hfuzz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ where
else if *build_type != BuildType::Debug {
// ensure we do not set --release when one of the build args
// contains a --profile
if !hfuzz_build_args.any(|f| &f[..9] == "--profile") {
if !hfuzz_build_args.any(|f| f.starts_with("--profile")) {
command.arg("--release");
}

Expand Down

0 comments on commit b7d4d99

Please sign in to comment.