about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2024-03-12 10:08:29 +0700
committerGitHub <noreply@github.com>2024-03-12 10:08:29 +0700
commit6650ef4274161694b37c4976b5dc67111fcabe4a (patch)
tree29d4dd1bfc49a158389f68146bea0b6852c3ee9b
parentb85174fc8d599668dd17ccdd62971a09cb9497c8 (diff)
parent08f6d59f505436f4aec70ddd341d27f1d7bd7ccf (diff)
downloadafl++-6650ef4274161694b37c4976b5dc67111fcabe4a.tar.gz
Merge pull request #2030 from ocean1/replay_loop_fix
Replay record loop fix
-rw-r--r--include/afl-record-compat.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/afl-record-compat.h b/include/afl-record-compat.h
index 2c79595d..3e5d60e3 100644
--- a/include/afl-record-compat.h
+++ b/include/afl-record-compat.h
@@ -28,7 +28,7 @@ int __afl_persistent_loop(unsigned int max_cnt) {
   static unsigned short int inited = 0;
   char                      tcase[PATH_MAX];
 
-  if (is_replay_record) {
+  if (is_replay_record && cycle_cnt) {
 
     if (!inited) {
 
@@ -59,7 +59,7 @@ int __afl_persistent_loop(unsigned int max_cnt) {
 
   }
 
-  return --cycle_cnt;
+  return cycle_cnt--;
 
 }