mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-17 12:18:08 +00:00
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
This commit is contained in:
@ -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!");
|
||||
|
Reference in New Issue
Block a user