diff options
author | yuawn <ssspeed00@gmail.com> | 2023-03-25 09:28:35 +0000 |
---|---|---|
committer | yuawn <ssspeed00@gmail.com> | 2023-03-25 09:28:35 +0000 |
commit | 0f62e0b1674f19c41c5deb65354e832a0aa87bef (patch) | |
tree | b7b954eafbd562fa5f173dd924e2657e563cc34b /src/afl-fuzz-bitmap.c | |
parent | 478f0bbc1ed4bdb39d365dd9d6c69c10917c8073 (diff) | |
download | afl++-0f62e0b1674f19c41c5deb65354e832a0aa87bef.tar.gz |
add check for n_fuzz update
Diffstat (limited to 'src/afl-fuzz-bitmap.c')
-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..fe90faf0 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 (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. */ |