about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2024-04-26 09:44:49 +0200
committerGitHub <noreply@github.com>2024-04-26 09:44:49 +0200
commitf3b6d64ad303a5409fa36d4dd81c838954939fb7 (patch)
treec8348cc1bd876004fc3191458e14a73f1e9f900a
parent951a0e52254d873dd0f1a3a80d9acda44563edd5 (diff)
parent43e9a139214d57888c8f234ee44044de5108f8ea (diff)
downloadafl++-f3b6d64ad303a5409fa36d4dd81c838954939fb7.tar.gz
Merge pull request #2066 from ahuo1/dev
fix: initialize n_fuzz_entry in perform_dry_run.
-rw-r--r--src/afl-fuzz-init.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/afl-fuzz-init.c b/src/afl-fuzz-init.c
index 2a8267cc..b844123d 100644
--- a/src/afl-fuzz-init.c
+++ b/src/afl-fuzz-init.c
@@ -914,6 +914,11 @@ void perform_dry_run(afl_state_t *afl) {
 
     res = calibrate_case(afl, q, use_mem, 0, 1);
 
+    /* For AFLFast schedules we update the queue entry */
+    if (unlikely(afl->schedule >= FAST && afl->schedule <= RARE) && likely(q->exec_cksum)) {
+      q->n_fuzz_entry = q->exec_cksum % N_FUZZ_SIZE;
+    }
+     
     if (afl->stop_soon) { return; }
 
     if (res == afl->crash_mode || res == FSRV_RUN_NOBITS) {