diff options
author | vanhauser-thc <vh@thc.org> | 2021-02-22 16:39:38 +0100 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2021-02-22 16:39:38 +0100 |
commit | 70fe872940b9815698b4317bdde33da1dae27923 (patch) | |
tree | fbe0d910d911152967050e5ee97259b2e4b5212c /src/afl-fuzz.c | |
parent | a252943236b12c080248747bee06c9c5084b871e (diff) | |
download | afl++-70fe872940b9815698b4317bdde33da1dae27923.tar.gz |
ensure a valid seed exists
Diffstat (limited to 'src/afl-fuzz.c')
-rw-r--r-- | src/afl-fuzz.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c index 24d77cc9..9137dc23 100644 --- a/src/afl-fuzz.c +++ b/src/afl-fuzz.c @@ -1707,7 +1707,12 @@ int main(int argc, char **argv_orig, char **envp) { cull_queue(afl); - if (!afl->pending_not_fuzzed) { + // ensure we have at least one seed that is not disabled. + u32 entry, valid_seeds = 0; + for (entry = 0; entry < afl->queued_paths; ++entry) + if (!afl->queue_buf[entry]->disabled) { ++valid_seeds; } + + if (!afl->pending_not_fuzzed || !valid_seeds) { FATAL("We need at least one valid input seed that does not crash!"); |