diff options
author | van Hauser <vh@thc.org> | 2021-03-19 23:55:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-19 23:55:32 +0100 |
commit | bc0ff559f50ed73d1af904c4110bc149cd8eba91 (patch) | |
tree | 03c3314427f02533a8db3e06587ce3afe74a5f23 /src/afl-fuzz.c | |
parent | 749b03d812b76746b4a673f34a13fb0b067fd61d (diff) | |
parent | 090128b3f8b8bc80cf47ae1481b01c0509dc6357 (diff) | |
download | afl++-bc0ff559f50ed73d1af904c4110bc149cd8eba91.tar.gz |
Merge pull request #824 from fuzzah/dev
add AFL_TARGET_ENV to afl-fuzz
Diffstat (limited to 'src/afl-fuzz.c')
-rw-r--r-- | src/afl-fuzz.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c index 1518a707..b1d01959 100644 --- a/src/afl-fuzz.c +++ b/src/afl-fuzz.c @@ -223,6 +223,7 @@ static void usage(u8 *argv0, int more_help) { "AFL_PYTHON_MODULE: mutate and trim inputs with the specified Python module\n" "AFL_QUIET: suppress forkserver status messages\n" "AFL_PRELOAD: LD_PRELOAD / DYLD_INSERT_LIBRARIES settings for target\n" + "AFL_TARGET_ENV: pass extra environment variables to target\n" "AFL_SHUFFLE_QUEUE: reorder the input queue randomly on startup\n" "AFL_SKIP_BIN_CHECK: skip the check, if the target is an executable\n" "AFL_SKIP_CPUFREQ: do not warn about variable cpu clocking\n" @@ -1303,6 +1304,13 @@ int main(int argc, char **argv_orig, char **envp) { } + u8 *extra_env = (u8 *)getenv("AFL_TARGET_ENV"); + if (extra_env && !extract_and_set_env(extra_env)) { + + FATAL("Bad value of AFL_TARGET_ENV"); + + } + save_cmdline(afl, argc, argv); fix_up_banner(afl, argv[optind]); |