Skip to content

Commit

Permalink
Another clippy bugfix (AFLplusplus#2806)
Browse files Browse the repository at this point in the history
  • Loading branch information
domenukk authored Jan 3, 2025
1 parent da55e70 commit b3b2163
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libafl_targets/src/libfuzzer/mutators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ where
return result.replace(Ok(MutationResult::Skipped));
}
if new_len > len_max {
return Err(Error::illegal_state("LLVMFuzzerCustomMutator returned more bytes than allowed. Expected up to {max_len} but got {new_len}"));
return Err(Error::illegal_state(format!("LLVMFuzzerCustomMutator returned more bytes than allowed. Expected up to {max_len} but got {new_len}")));
}
input.resize(new_len, 0);
Ok(MutationResult::Mutated)
Expand Down Expand Up @@ -448,7 +448,7 @@ where
}

if new_len > len_max {
return Err(Error::illegal_state("LLVMFuzzerCustomCrossOver returned more bytes than allowed. Expected up to {max_len} but got {new_len}"));
return Err(Error::illegal_state(format!("LLVMFuzzerCustomCrossOver returned more bytes than allowed. Expected up to {max_len} but got {new_len}")));
}

input.resize(new_len, 0);
Expand Down

0 comments on commit b3b2163

Please sign in to comment.