diff options
author | Dominik Maier <domenukk@gmail.com> | 2021-01-08 11:54:35 +0100 |
---|---|---|
committer | Dominik Maier <domenukk@gmail.com> | 2021-01-08 11:54:35 +0100 |
commit | 3d1a25ce4e8862b82662c64fbea000692f300c62 (patch) | |
tree | 7c3c8b9a85f88941f2ea4a25aed786ca51d875ff /src/afl-fuzz-run.c | |
parent | 34732e3c5ede9020ff1802f0f0827e3731217dce (diff) | |
download | afl++-3d1a25ce4e8862b82662c64fbea000692f300c62.tar.gz |
added check to silence scan-build
Diffstat (limited to 'src/afl-fuzz-run.c')
-rw-r--r-- | src/afl-fuzz-run.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/afl-fuzz-run.c b/src/afl-fuzz-run.c index 41557707..cc2ef891 100644 --- a/src/afl-fuzz-run.c +++ b/src/afl-fuzz-run.c @@ -430,6 +430,13 @@ u8 calibrate_case(afl_state_t *afl, struct queue_entry *q, u8 *use_mem, /* OK, let's collect some stats about the performance of this test case. This is used for fuzzing air time calculations in calculate_score(). */ + if (unlikely(!afl->stage_max)) { + + // Pretty sure this cannot happen, yet scan-build complains. + FATAL("BUG: stage_max should not be 0 here! Please report this condition."); + + } + q->exec_us = (stop_us - start_us) / afl->stage_max; q->bitmap_size = count_bytes(afl, afl->fsrv.trace_bits); q->handicap = handicap; |