about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2023-03-25 10:47:58 +0100
committerGitHub <noreply@github.com>2023-03-25 10:47:58 +0100
commit64fd01d46ca8806cf014b98c4c54412f4e3e81e0 (patch)
tree55108dabbf2c78d51e5c0dd61aa85681aa6053b8 /src
parent24503fba5fd2580559223ec3c6ee408dfa15e080 (diff)
parentb2f9802f9f0f54337c552d83a860f3e1a84d7191 (diff)
downloadafl++-64fd01d46ca8806cf014b98c4c54412f4e3e81e0.tar.gz
Merge pull request #1681 from AFLplusplus/dev
Push to stable
Diffstat (limited to 'src')
-rw-r--r--src/afl-fuzz-bitmap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/afl-fuzz-bitmap.c b/src/afl-fuzz-bitmap.c
index c65dd641..d9c792d1 100644
--- a/src/afl-fuzz-bitmap.c
+++ b/src/afl-fuzz-bitmap.c
@@ -575,8 +575,12 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) {
     }
 
     /* For AFLFast schedules we update the new queue entry */
-    afl->queue_top->n_fuzz_entry = cksum % N_FUZZ_SIZE;
-    afl->n_fuzz[afl->queue_top->n_fuzz_entry] = 1;
+    if (likely(cksum)) {
+
+      afl->queue_top->n_fuzz_entry = cksum % N_FUZZ_SIZE;
+      afl->n_fuzz[afl->queue_top->n_fuzz_entry] = 1;
+
+    }
 
     /* Try to calibrate inline; this also calls update_bitmap_score() when
        successful. */