aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2021-01-28 14:11:33 +0100
committervan Hauser <vh@thc.org>2021-01-28 14:11:33 +0100
commita61a30dee03aced16d117150c4dbfd7079de7e68 (patch)
tree54d9b3d693f72a515c120b27e9156b1b80356c7c /src
parentd62c83d58f67cd911b0a49f0e6662ac5b75741ad (diff)
downloadafl++-a61a30dee03aced16d117150c4dbfd7079de7e68.tar.gz
fix another pending_not_fuzzed location
Diffstat (limited to 'src')
-rw-r--r--src/afl-fuzz-extras.c2
-rw-r--r--src/afl-fuzz-init.c5
-rw-r--r--src/afl-fuzz-one.c4
-rw-r--r--src/afl-fuzz.c2
4 files changed, 7 insertions, 6 deletions
diff --git a/src/afl-fuzz-extras.c b/src/afl-fuzz-extras.c
index a3583651..7ecad233 100644
--- a/src/afl-fuzz-extras.c
+++ b/src/afl-fuzz-extras.c
@@ -413,7 +413,7 @@ void dedup_extras(afl_state_t *afl) {
if (j + 1 < afl->extras_cnt) // not at the end of the list?
memmove((char *)&afl->extras[j], (char *)&afl->extras[j + 1],
(afl->extras_cnt - j - 1) * sizeof(struct extra_data));
- afl->extras_cnt--;
+ --afl->extras_cnt;
goto restart_dedup; // restart if several duplicates are in a row
}
diff --git a/src/afl-fuzz-init.c b/src/afl-fuzz-init.c
index 5f5e65cd..84f81112 100644
--- a/src/afl-fuzz-init.c
+++ b/src/afl-fuzz-init.c
@@ -1041,6 +1041,7 @@ void perform_dry_run(afl_state_t *afl) {
if (!p->was_fuzzed) {
+ p->was_fuzzed = 1;
--afl->pending_not_fuzzed;
--afl->active_paths;
@@ -1153,7 +1154,7 @@ restart_outer_cull_loop:
p->was_fuzzed = 1;
--afl->pending_not_fuzzed;
- afl->active_paths--;
+ --afl->active_paths;
}
@@ -1168,7 +1169,7 @@ restart_outer_cull_loop:
q->was_fuzzed = 1;
--afl->pending_not_fuzzed;
- afl->active_paths--;
+ --afl->active_paths;
}
diff --git a/src/afl-fuzz-one.c b/src/afl-fuzz-one.c
index af768183..ff766158 100644
--- a/src/afl-fuzz-one.c
+++ b/src/afl-fuzz-one.c
@@ -530,7 +530,7 @@ u8 fuzz_one_original(afl_state_t *afl) {
len = afl->queue_cur->len;
/* maybe current entry is not ready for splicing anymore */
- if (unlikely(len <= 4 && old_len > 4)) afl->ready_for_splicing_count--;
+ if (unlikely(len <= 4 && old_len > 4)) --afl->ready_for_splicing_count;
}
@@ -2958,7 +2958,7 @@ static u8 mopt_common_fuzzing(afl_state_t *afl, MOpt_globals_t MOpt_globals) {
len = afl->queue_cur->len;
/* maybe current entry is not ready for splicing anymore */
- if (unlikely(len <= 4 && old_len > 4)) afl->ready_for_splicing_count--;
+ if (unlikely(len <= 4 && old_len > 4)) --afl->ready_for_splicing_count;
}
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index a1f749b5..e856730e 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -1636,7 +1636,7 @@ int main(int argc, char **argv_orig, char **envp) {
(afl->old_seed_selection && !afl->queue_cur))) {
++afl->queue_cycle;
- runs_in_current_cycle = 0;
+ runs_in_current_cycle = (u32)-1;
afl->cur_skipped_paths = 0;
if (unlikely(afl->old_seed_selection)) {