diff options
| author | Your Name <you@example.com> | 2021-11-29 17:38:06 +0000 |
|---|---|---|
| committer | Your Name <you@example.com> | 2021-11-29 17:38:06 +0000 |
| commit | b48999f7c9e66e81899f8f5486c0931968bf3c77 (patch) | |
| tree | 5fa997f722677898c8f90b6bcbd413ec9050a680 /frida_mode/src/stats | |
| parent | b0c51964b7f1ca57455268ab3c65117526ba9742 (diff) | |
| download | afl++-b48999f7c9e66e81899f8f5486c0931968bf3c77.tar.gz | |
Changes to support defaults for configuration options
Diffstat (limited to 'frida_mode/src/stats')
| -rw-r--r-- | frida_mode/src/stats/stats.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/frida_mode/src/stats/stats.c b/frida_mode/src/stats/stats.c index a61834d6..83ecf89a 100644 --- a/frida_mode/src/stats/stats.c +++ b/frida_mode/src/stats/stats.c @@ -323,7 +323,7 @@ static void stats_observer_init(GumStalkerObserver *observer) { void stats_config(void) { stats_filename = getenv("AFL_FRIDA_STATS_FILE"); - stats_interval = util_read_num("AFL_FRIDA_STATS_INTERVAL"); + stats_interval = util_read_num("AFL_FRIDA_STATS_INTERVAL", 10); } @@ -332,7 +332,8 @@ void stats_init(void) { FOKF("Stats - file [%s]", stats_filename); FOKF("Stats - interval [%" G_GINT64_MODIFIER "u]", stats_interval); - if (stats_interval != 0 && stats_filename == NULL) { + if (getenv("AFL_FRIDA_STATS_INTERVAL") != NULL && + getenv("AFL_FRIDA_STATS_FILE") == NULL) { FFATAL( "AFL_FRIDA_STATS_FILE must be specified if " @@ -340,7 +341,6 @@ void stats_init(void) { } - if (stats_interval == 0) { stats_interval = 10; } stats_interval_us = stats_interval * MICRO_TO_SEC; if (stats_filename == NULL) { return; } |
