diff options
author | vanhauser-thc <vh@thc.org> | 2021-07-23 10:34:51 +0200 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2021-07-23 10:34:51 +0200 |
commit | dc0fed6e0c13702fa36fab66631fb5bbca6d64de (patch) | |
tree | 422b6ded4c69bda8f30f6f8ea500a7c58c19608b /src/afl-fuzz-one.c | |
parent | 0e563656fbfe6fbd9d882a2a10997c18ae7de937 (diff) | |
download | afl++-dc0fed6e0c13702fa36fab66631fb5bbca6d64de.tar.gz |
handle single seed with perf_score 0
Diffstat (limited to 'src/afl-fuzz-one.c')
-rw-r--r-- | src/afl-fuzz-one.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/afl-fuzz-one.c b/src/afl-fuzz-one.c index 7274f679..a92cef7a 100644 --- a/src/afl-fuzz-one.c +++ b/src/afl-fuzz-one.c @@ -547,7 +547,11 @@ u8 fuzz_one_original(afl_state_t *afl) { afl->queue_cur->perf_score = orig_perf = perf_score = calculate_score(afl, afl->queue_cur); - if (unlikely(perf_score <= 0)) { goto abandon_entry; } + if (unlikely(perf_score <= 0 && afl->active_paths > 1)) { + + goto abandon_entry; + + } if (unlikely(afl->shm.cmplog_mode && afl->queue_cur->colorized < afl->cmplog_lvl && @@ -3047,7 +3051,11 @@ static u8 mopt_common_fuzzing(afl_state_t *afl, MOpt_globals_t MOpt_globals) { else orig_perf = perf_score = calculate_score(afl, afl->queue_cur); - if (unlikely(perf_score <= 0)) { goto abandon_entry; } + if (unlikely(perf_score <= 0 && afl->active_paths > 1)) { + + goto abandon_entry; + + } if (unlikely(afl->shm.cmplog_mode && afl->queue_cur->colorized < afl->cmplog_lvl && |