aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
author= <=>2024-03-11 12:01:06 +0000
committer= <=>2024-03-11 12:01:06 +0000
commit08f6d59f505436f4aec70ddd341d27f1d7bd7ccf (patch)
treed1584486fcf028a951774d731540a3899b102bdf /include
parent2ed2ac80bc632f39fa95e1d51c4f14ecde48355a (diff)
downloadAFLplusplus-08f6d59f505436f4aec70ddd341d27f1d7bd7ccf.tar.gz
correct fix
Diffstat (limited to 'include')
-rw-r--r--include/afl-record-compat.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/afl-record-compat.h b/include/afl-record-compat.h
index 677d47b0..3e5d60e3 100644
--- a/include/afl-record-compat.h
+++ b/include/afl-record-compat.h
@@ -24,15 +24,15 @@ unsigned char fuzz_buf[FUZZ_BUF_SIZE];
int __afl_persistent_loop(unsigned int max_cnt) {
- static unsigned int cycle_cnt = 2;
+ static unsigned int cycle_cnt = 1;
static unsigned short int inited = 0;
char tcase[PATH_MAX];
- if (is_replay_record) {
+ if (is_replay_record && cycle_cnt) {
if (!inited) {
- cycle_cnt = replay_record_cnt+1;
+ cycle_cnt = replay_record_cnt;
inited = 1;
}
@@ -59,7 +59,7 @@ int __afl_persistent_loop(unsigned int max_cnt) {
}
- return --cycle_cnt;
+ return cycle_cnt--;
}