Skip to content

Commit

Permalink
Fix honggfuzz bug
Browse files Browse the repository at this point in the history
  • Loading branch information
louismerlin committed Oct 5, 2023
1 parent 0856ad1 commit 57a1292
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 33 deletions.
62 changes: 31 additions & 31 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ anyhow = { version = "1.0.75", optional = true }
afl = { version = "0.14.1", default-features = false, optional = true }
# We use our own fork of honggfuzz to use the tool's latest release
# https://github.com/rust-fuzz/honggfuzz-rs/pull/85
honggfuzz = { package = "ziggy-honggfuzz", version = "0.5.55", optional = true }
honggfuzz = { package = "ziggy-honggfuzz-2", version = "0.5.55", optional = true }
serde_json = { version = "1.0.105", optional = true }
log = { version = "0.4.20", optional = true }
env_logger = { version = "0.10.0", optional = true }
Expand Down
5 changes: 4 additions & 1 deletion src/bin/cargo-ziggy/fuzz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,12 @@ impl Fuzz {
.output()
.context("could not run `cargo hfuzz run --help`")?;

if !std::str::from_utf8(hfuzz_help.stderr.as_slice())
if !std::str::from_utf8(hfuzz_help.stdout.as_slice())
.unwrap_or_default()
.contains("dynamic_input")
&& !std::str::from_utf8(hfuzz_help.stderr.as_slice())
.unwrap_or_default()
.contains("dynamic_input")
{
panic!("Outdated version of honggfuzz, please update the ziggy version in your Cargo.toml or rebuild the project");
}
Expand Down

0 comments on commit 57a1292

Please sign in to comment.