aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorh1994st <h1994st@gmail.com>2020-08-27 00:32:53 -0400
committerh1994st <h1994st@gmail.com>2020-08-27 00:32:53 -0400
commit9a6a32775f03e6fbd6df131742bee4c30bcd94a6 (patch)
tree0d276b6ce340fe73c0cf418a1923c4dfafb77bd2
parent3e8beaafc8ce6d444575074f8c45c9a9020d9b54 (diff)
downloadafl++-9a6a32775f03e6fbd6df131742bee4c30bcd94a6.tar.gz
Prevent afl-fuzz from modifying stage_max during fuzzing
-rw-r--r--src/afl-fuzz-one.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/afl-fuzz-one.c b/src/afl-fuzz-one.c
index 03c0d3a1..bf568c38 100644
--- a/src/afl-fuzz-one.c
+++ b/src/afl-fuzz-one.c
@@ -1767,19 +1767,23 @@ custom_mutator_stage:
}
- /* If we're finding new stuff, let's run for a bit longer, limits
- permitting. */
+ if (!el->afl_custom_fuzz_count) {
- if (afl->queued_paths != havoc_queued) {
+ /* If we're finding new stuff, let's run for a bit longer, limits
+ permitting. */
- if (perf_score <= afl->havoc_max_mult * 100) {
+ if (afl->queued_paths != havoc_queued) {
- afl->stage_max *= 2;
- perf_score *= 2;
+ if (perf_score <= afl->havoc_max_mult * 100) {
- }
+ afl->stage_max *= 2;
+ perf_score *= 2;
+
+ }
- havoc_queued = afl->queued_paths;
+ havoc_queued = afl->queued_paths;
+
+ }
}