about summary refs log tree commit diff
path: root/src/afl-fuzz-init.c
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-06-22 17:24:06 +0200
committervanhauser-thc <vh@thc.org>2021-06-22 17:24:06 +0200
commitcbac22d82b90d631bafc4572aa79faa0c568beeb (patch)
tree6d943e4ea1ebe3f08d00524c8b11919df1ac3332 /src/afl-fuzz-init.c
parentba9323f14cb4ba7c99c4081f19c12b93e112dd65 (diff)
downloadafl++-cbac22d82b90d631bafc4572aa79faa0c568beeb.tar.gz
reverse read the queue n resumes
Diffstat (limited to 'src/afl-fuzz-init.c')
-rw-r--r--src/afl-fuzz-init.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/afl-fuzz-init.c b/src/afl-fuzz-init.c
index 872e3a32..cc5974d8 100644
--- a/src/afl-fuzz-init.c
+++ b/src/afl-fuzz-init.c
@@ -710,7 +710,10 @@ void read_testcases(afl_state_t *afl, u8 *directory) {
 
   }
 
-  for (i = 0; i < (u32)nl_cnt; ++i) {
+  i = nl_cnt;
+  do {
+
+    --i;
 
     struct stat st;
 
@@ -801,7 +804,7 @@ void read_testcases(afl_state_t *afl, u8 *directory) {
 
     */
 
-  }
+  } while (i > 0);
 
   free(nl);                                                  /* not tracked */