aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-02-22 12:59:01 +0100
committervanhauser-thc <vh@thc.org>2021-02-22 12:59:01 +0100
commita252943236b12c080248747bee06c9c5084b871e (patch)
treecfda421e67bb614137c821dcf0cafef58f8e3bca /src
parent8c133b607cdbde60e6c922236947f7a69c9190f2 (diff)
downloadafl++-a252943236b12c080248747bee06c9c5084b871e.tar.gz
another fix for disabled entries
Diffstat (limited to 'src')
-rw-r--r--src/afl-fuzz.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index e2db029d..24d77cc9 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -1770,12 +1770,15 @@ int main(int argc, char **argv_orig, char **envp) {
if (unlikely(afl->old_seed_selection)) {
afl->current_entry = 0;
- while (unlikely(afl->queue_buf[afl->current_entry]->disabled)) {
+ while (unlikely(afl->current_entry < afl->queued_paths &&
+ afl->queue_buf[afl->current_entry]->disabled)) {
++afl->current_entry;
}
+ if (afl->current_entry >= afl->queued_paths) { afl->current_entry = 0; }
+
afl->queue_cur = afl->queue_buf[afl->current_entry];
if (unlikely(seek_to)) {