about summary refs log tree commit diff
path: root/src/afl-fuzz-init.c
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2023-04-25 11:56:50 +0200
committervanhauser-thc <vh@thc.org>2023-04-25 11:56:50 +0200
commitbc969f78f634035abf88bc73a5076848660901e7 (patch)
tree8a395613433680dfb97056f2a11c2a6d31cb6ddb /src/afl-fuzz-init.c
parent7b877e2c1d96efa7486ef4ba7860bec58dd1cd5b (diff)
downloadafl++-bc969f78f634035abf88bc73a5076848660901e7.tar.gz
fixes
Diffstat (limited to 'src/afl-fuzz-init.c')
-rw-r--r--src/afl-fuzz-init.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/afl-fuzz-init.c b/src/afl-fuzz-init.c
index 002a26f8..bd591c8f 100644
--- a/src/afl-fuzz-init.c
+++ b/src/afl-fuzz-init.c
@@ -756,7 +756,7 @@ void read_testcases(afl_state_t *afl, u8 *directory) {
         free(nl[i]);                                         /* not tracked */
         read_testcases(afl, fn2);
         ck_free(fn2);
-        continue;
+        goto next_entry;
 
       }
 
@@ -765,7 +765,7 @@ void read_testcases(afl_state_t *afl, u8 *directory) {
       if (!S_ISREG(st.st_mode) || !st.st_size || strstr(fn2, "/README.txt")) {
 
         ck_free(fn2);
-        continue;
+        goto next_entry;
 
       }
 
@@ -812,13 +812,14 @@ void read_testcases(afl_state_t *afl, u8 *directory) {
 
       }
 
+    next_entry:
       if (unlikely(afl->in_place_resume)) {
 
         if (unlikely(i == 0)) { done = 1; }
 
       } else {
 
-        if (unlikely(++i == (u32)nl_cnt)) { done = 1; }
+        if (unlikely(++i >= (u32)nl_cnt)) { done = 1; }
 
       }