diff options
author | van Hauser <vh@thc.org> | 2022-06-28 14:18:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-28 14:18:44 +0200 |
commit | 40947508037b874020c8dd1251359fecaab04b9d (patch) | |
tree | e512d9b04e55c619adaefb22cd9ed1e33eac1feb /src/afl-fuzz-state.c | |
parent | ba3c7bfe40f9b17a691958e3525828385127ad25 (diff) | |
parent | 92352951d7a8485bd2413009fcd052e85dc398fb (diff) | |
download | afl++-40947508037b874020c8dd1251359fecaab04b9d.tar.gz |
Merge pull request #1438 from AFLplusplus/dev 4.01c
push to stable
Diffstat (limited to 'src/afl-fuzz-state.c')
-rw-r--r-- | src/afl-fuzz-state.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/afl-fuzz-state.c b/src/afl-fuzz-state.c index 98217438..cc4138ae 100644 --- a/src/afl-fuzz-state.c +++ b/src/afl-fuzz-state.c @@ -101,6 +101,7 @@ void afl_state_init(afl_state_t *afl, uint32_t map_size) { afl->stats_update_freq = 1; afl->stats_avg_exec = 0; afl->skip_deterministic = 1; + afl->sync_time = SYNC_TIME; afl->cmplog_lvl = 2; afl->min_length = 1; afl->max_length = MAX_FILE; @@ -509,6 +510,14 @@ void read_afl_environment(afl_state_t *afl, char **envp) { afl->afl_env.afl_pizza_mode = atoi((u8 *)get_afl_env(afl_environment_variables[i])); + + } else if (!strncmp(env, "AFL_NO_CRASH_README", + + afl_environment_variable_len)) { + + afl->afl_env.afl_no_crash_readme = + atoi((u8 *)get_afl_env(afl_environment_variables[i])); + if (afl->afl_env.afl_pizza_mode == 0) { afl->afl_env.afl_pizza_mode = 1; @@ -519,6 +528,24 @@ void read_afl_environment(afl_state_t *afl, char **envp) { } + } else if (!strncmp(env, "AFL_SYNC_TIME", + + afl_environment_variable_len)) { + + int time = atoi((u8 *)get_afl_env(afl_environment_variables[i])); + if (time > 0) { + + afl->sync_time = time * (60 * 1000LL); + + } else { + + WARNF( + "incorrect value for AFL_SYNC_TIME environment variable, " + "used default value %lld instead.", + afl->sync_time / 60 / 1000); + + } + } } else { |