about summary refs log tree commit diff
path: root/src/afl-fuzz-queue.c
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-03-24 11:12:23 +0100
committervanhauser-thc <vh@thc.org>2021-03-24 11:12:44 +0100
commitd68bd656fef035e83bcc372680e8ecd538d9badb (patch)
tree863590b61ece8db9a1bc13914f47c3c1f93accdd /src/afl-fuzz-queue.c
parent8bd5d7676ed41c599e31a26f0170f4f4276912ca (diff)
downloadafl++-d68bd656fef035e83bcc372680e8ecd538d9badb.tar.gz
fix counting favorites
Diffstat (limited to 'src/afl-fuzz-queue.c')
-rw-r--r--src/afl-fuzz-queue.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/afl-fuzz-queue.c b/src/afl-fuzz-queue.c
index 63592cef..e5f51a6c 100644
--- a/src/afl-fuzz-queue.c
+++ b/src/afl-fuzz-queue.c
@@ -680,13 +680,17 @@ void cull_queue(afl_state_t *afl) {
 
       }
 
-      afl->top_rated[i]->favored = 1;
-      ++afl->queued_favored;
+      if (!afl->top_rated[i]->favored) {
 
-      if (afl->top_rated[i]->fuzz_level == 0 ||
-          !afl->top_rated[i]->was_fuzzed) {
+        afl->top_rated[i]->favored = 1;
+        ++afl->queued_favored;
 
-        ++afl->pending_favored;
+        if (afl->top_rated[i]->fuzz_level == 0 ||
+            !afl->top_rated[i]->was_fuzzed) {
+
+          ++afl->pending_favored;
+
+        }
 
       }