about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-08-27 08:56:08 +0200
committerGitHub <noreply@github.com>2020-08-27 08:56:08 +0200
commitb44620f0b01733512b8da6e73f75113db9a8ca8d (patch)
tree0d276b6ce340fe73c0cf418a1923c4dfafb77bd2 /src
parent3e8beaafc8ce6d444575074f8c45c9a9020d9b54 (diff)
parent9a6a32775f03e6fbd6df131742bee4c30bcd94a6 (diff)
downloadafl++-b44620f0b01733512b8da6e73f75113db9a8ca8d.tar.gz
Merge pull request #526 from h1994st/dev
Prevent afl-fuzz from modifying stage_max during fuzzing
Diffstat (limited to 'src')
-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;
+
+              }
 
             }