about summary refs log tree commit diff
path: root/src/afl-fuzz.c
diff options
context:
space:
mode:
authorDominik Maier <domenukk@gmail.com>2021-05-09 22:41:11 +0200
committerDominik Maier <domenukk@gmail.com>2021-05-09 22:41:11 +0200
commit7e0000021c8e456301bb861438752e0fe884660e (patch)
treebe6132b331b04ced83283770e3574fdb729eae92 /src/afl-fuzz.c
parentde69ba01bae87ad5e1cbfa63641d64fe73e755dd (diff)
parent6c20d54b23f9a49ca65a4b2f786b6be1a2f51105 (diff)
downloadafl++-7e0000021c8e456301bb861438752e0fe884660e.tar.gz
Merge branch 'dev' of github.com:AFLplusplus/AFLplusplus into dev
Diffstat (limited to 'src/afl-fuzz.c')
-rw-r--r--src/afl-fuzz.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index 8c3ba575..8de3ed6b 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -204,6 +204,7 @@ static void usage(u8 *argv0, int more_help) {
       "AFL_DISABLE_TRIM: disable the trimming of test cases\n"
       "AFL_DUMB_FORKSRV: use fork server without feedback from target\n"
       "AFL_EXIT_WHEN_DONE: exit when all inputs are run and no new finds are found\n"
+      "AFL_EXIT_ON_TIME: exit when no new paths are found within the specified time period\n"
       "AFL_EXPAND_HAVOC_NOW: immediately enable expand havoc mode (default: after 60 minutes and a cycle without finds)\n"
       "AFL_FAST_CAL: limit the calibration stage to three cycles for speedup\n"
       "AFL_FORCE_UI: force showing the status screen (for virtual consoles)\n"
@@ -1246,6 +1247,13 @@ int main(int argc, char **argv_orig, char **envp) {
 
   }
 
+  if (afl->afl_env.afl_exit_on_time) {
+
+    u64 exit_on_time = atoi(afl->afl_env.afl_exit_on_time);
+    afl->exit_on_time = (u64)exit_on_time * 1000;
+
+  }
+
   if (afl->afl_env.afl_max_det_extras) {
 
     s32 max_det_extras = atoi(afl->afl_env.afl_max_det_extras);