fix oversight for accessing nfuzz

This commit is contained in:
van Hauser
2020-12-09 12:03:11 +01:00
parent d1eb4eeb7f
commit e5c50037d5

View File

@ -45,8 +45,15 @@ inline u32 select_next_queue_entry(afl_state_t *afl) {
double compute_weight(afl_state_t *afl, struct queue_entry *q,
double avg_exec_us, double avg_bitmap_size) {
u32 hits = afl->n_fuzz[q->n_fuzz_entry];
if (hits == 0) hits = 1;
u32 hits;
if (likely(afl->schedule >= FAST && afl->schedule < RARE)) {
hits = afl->n_fuzz[q->n_fuzz_entry];
if (hits == 0) { hits = 1; }
} else { hits = 1; }
double weight = 1.0;
weight *= avg_exec_us / q->exec_us;