diff options
author | van Hauser <vh@thc.org> | 2023-03-25 10:47:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-25 10:47:02 +0100 |
commit | b2f9802f9f0f54337c552d83a860f3e1a84d7191 (patch) | |
tree | 55108dabbf2c78d51e5c0dd61aa85681aa6053b8 | |
parent | 478f0bbc1ed4bdb39d365dd9d6c69c10917c8073 (diff) | |
parent | e24ae963614ecc0874ab5e8ff370419401292913 (diff) | |
download | afl++-b2f9802f9f0f54337c552d83a860f3e1a84d7191.tar.gz |
Merge pull request #1680 from yuawn/add_check_for_n_fuzz_update
add check for n_fuzz update
-rw-r--r-- | src/afl-fuzz-bitmap.c | 8 |
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. */ |