about summary refs log tree commit diff
path: root/src/afl-fuzz-stats.c
diff options
context:
space:
mode:
authorRishi Ranjan <43873720+rish9101@users.noreply.github.com>2020-03-15 22:59:23 +0530
committerGitHub <noreply@github.com>2020-03-15 18:29:23 +0100
commit126d1f1cd14c6bb1fb59159965045f02d98d1b43 (patch)
tree64a12fc2222b766087f0edfd63c30acf27c19cf4 /src/afl-fuzz-stats.c
parent7685893cdbfd621b09b57a11c135347f692333cc (diff)
downloadafl++-126d1f1cd14c6bb1fb59159965045f02d98d1b43.tar.gz
Move afl-fuzz related env variables into afl_state_t (#252)
* Move afl-fuzz related env variables into afl_state_t

* Move the env variables assignment from fuzz_init and code Format

* Fix typo

* Remove redundant env variables from afl_env struct

* Rename function to read_afl_environment
Diffstat (limited to 'src/afl-fuzz-stats.c')
-rw-r--r--src/afl-fuzz-stats.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/afl-fuzz-stats.c b/src/afl-fuzz-stats.c
index e03018a1..0885c906 100644
--- a/src/afl-fuzz-stats.c
+++ b/src/afl-fuzz-stats.c
@@ -274,10 +274,10 @@ void show_stats(afl_state_t *afl) {
   /* Honor AFL_EXIT_WHEN_DONE and AFL_BENCH_UNTIL_CRASH. */
 
   if (!afl->dumb_mode && afl->cycles_wo_finds > 100 &&
-      !afl->pending_not_fuzzed && get_afl_env("AFL_EXIT_WHEN_DONE"))
+      !afl->pending_not_fuzzed && afl->afl_env.afl_exit_when_done)
     afl->stop_soon = 2;
 
-  if (afl->total_crashes && get_afl_env("AFL_BENCH_UNTIL_CRASH"))
+  if (afl->total_crashes && afl->afl_env.afl_bench_until_crash)
     afl->stop_soon = 2;
 
   /* If we're not on TTY, bail out. */
@@ -860,7 +860,7 @@ void show_init_stats(afl_state_t *afl) {
   /* In dumb mode, re-running every timing out test case with a generous time
      limit is very expensive, so let's select a more conservative default. */
 
-  if (afl->dumb_mode && !get_afl_env("AFL_HANG_TMOUT"))
+  if (afl->dumb_mode && !(afl->afl_env.afl_hang_tmout))
     afl->hang_tmout = MIN(EXEC_TIMEOUT, afl->fsrv.exec_tmout * 2 + 100);
 
   OKF("All set and ready to roll!");