about summary refs log tree commit diff
path: root/src/afl-fuzz-stats.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-09-07 17:30:28 +0200
committervan Hauser <vh@thc.org>2020-09-07 17:30:28 +0200
commit6404abd7d609350ffd6c6f221cbf56e60b2ef030 (patch)
tree5e81ba7c8fc92bb26bdd6847027ef4feec6042fa /src/afl-fuzz-stats.c
parent7bcbfd48e54eba5a99d05b04f4f3d6bea29cde80 (diff)
downloadafl++-6404abd7d609350ffd6c6f221cbf56e60b2ef030.tar.gz
bugfix for fixed seeds
Diffstat (limited to 'src/afl-fuzz-stats.c')
-rw-r--r--src/afl-fuzz-stats.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/afl-fuzz-stats.c b/src/afl-fuzz-stats.c
index dfc0cd97..1d5b169d 100644
--- a/src/afl-fuzz-stats.c
+++ b/src/afl-fuzz-stats.c
@@ -1022,7 +1022,11 @@ void show_init_stats(afl_state_t *afl) {
 
   /* Let's keep things moving with slow binaries. */
 
-  if (avg_us > 50000) {
+  if (unlikely(afl->fixed_seed)) {
+
+    afl->havoc_div = 1;
+
+  } else if (avg_us > 50000) {
 
     afl->havoc_div = 10;                                /* 0-19 execs/sec   */
 
@@ -1093,7 +1097,11 @@ void show_init_stats(afl_state_t *afl) {
        random scheduler jitter is less likely to have any impact, and because
        our patience is wearing thin =) */
 
-    if (avg_us > 50000) {
+    if (unlikely(afl->fixed_seed)) {
+
+      afl->fsrv.exec_tmout = avg_us * 5 / 1000;
+
+    } else if (avg_us > 50000) {
 
       afl->fsrv.exec_tmout = avg_us * 2 / 1000;