mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-15 03:18:07 +00:00
Fixed according to PR comment, moved cli flag to an env variable
This commit is contained in:
@ -24,6 +24,7 @@
|
||||
*/
|
||||
|
||||
#include <signal.h>
|
||||
#include <limits.h>
|
||||
#include "afl-fuzz.h"
|
||||
#include "envs.h"
|
||||
|
||||
@ -566,6 +567,25 @@ void read_afl_environment(afl_state_t *afl, char **envp) {
|
||||
|
||||
}
|
||||
|
||||
} else if (!strncmp(env, "AFL_FUZZER_STATS_UPDATE_INTERVAL",
|
||||
|
||||
afl_environment_variable_len)) {
|
||||
|
||||
u64 stats_update_freq_sec =
|
||||
strtoull(get_afl_env(afl_environment_variables[i]), NULL, 0);
|
||||
if (ULLONG_MAX == stats_update_freq_sec ||
|
||||
0 == stats_update_freq_sec) {
|
||||
|
||||
WARNF(
|
||||
"Incorrect value given to AFL_FUZZER_STATS_UPDATE_INTERVAL, "
|
||||
"using default of 60 seconds\n");
|
||||
|
||||
} else {
|
||||
|
||||
afl->stats_file_update_freq_msecs = stats_update_freq_sec * 1000;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user