aboutsummaryrefslogtreecommitdiff
path: root/src/afl-analyze.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2021-03-19 19:04:59 +0100
committerGitHub <noreply@github.com>2021-03-19 19:04:59 +0100
commite98cd008222aa3bfea9b696ad756163302437eb3 (patch)
tree56cce5a15206634bd1877c428a5b15c064d7fa53 /src/afl-analyze.c
parent23f7bee81c46ad4f0f65fa56d08064ab5f1e2e6f (diff)
parent2102264acf5c271b7560a82771b3af8136af9354 (diff)
downloadafl++-e98cd008222aa3bfea9b696ad756163302437eb3.tar.gz
Merge pull request #831 from AFLplusplus/dev
Push to stable
Diffstat (limited to 'src/afl-analyze.c')
-rw-r--r--src/afl-analyze.c58
1 files changed, 1 insertions, 57 deletions
diff --git a/src/afl-analyze.c b/src/afl-analyze.c
index d46ecb8d..86b0f7e9 100644
--- a/src/afl-analyze.c
+++ b/src/afl-analyze.c
@@ -822,38 +822,7 @@ static void set_up_environment(void) {
if (qemu_mode) {
- u8 *qemu_preload = getenv("QEMU_SET_ENV");
- u8 *afl_preload = getenv("AFL_PRELOAD");
- u8 *buf;
-
- s32 i, afl_preload_size = strlen(afl_preload);
- for (i = 0; i < afl_preload_size; ++i) {
-
- if (afl_preload[i] == ',') {
-
- PFATAL(
- "Comma (',') is not allowed in AFL_PRELOAD when -Q is "
- "specified!");
-
- }
-
- }
-
- if (qemu_preload) {
-
- buf = alloc_printf("%s,LD_PRELOAD=%s,DYLD_INSERT_LIBRARIES=%s",
- qemu_preload, afl_preload, afl_preload);
-
- } else {
-
- buf = alloc_printf("LD_PRELOAD=%s,DYLD_INSERT_LIBRARIES=%s",
- afl_preload, afl_preload);
-
- }
-
- setenv("QEMU_SET_ENV", buf, 1);
-
- ck_free(buf);
+ /* afl-qemu-trace takes care of converting AFL_PRELOAD. */
} else {
@@ -1079,31 +1048,6 @@ int main(int argc, char **argv_orig, char **envp) {
if (optind == argc || !in_file) { usage(argv[0]); }
- if (qemu_mode && getenv("AFL_USE_QASAN")) {
-
- u8 *preload = getenv("AFL_PRELOAD");
- u8 *libqasan = get_libqasan_path(argv_orig[0]);
-
- if (!preload) {
-
- setenv("AFL_PRELOAD", libqasan, 0);
-
- } else {
-
- u8 *result = ck_alloc(strlen(libqasan) + strlen(preload) + 2);
- strcpy(result, libqasan);
- strcat(result, " ");
- strcat(result, preload);
-
- setenv("AFL_PRELOAD", result, 1);
- ck_free(result);
-
- }
-
- ck_free(libqasan);
-
- }
-
map_size = get_map_size();
use_hex_offsets = !!get_afl_env("AFL_ANALYZE_HEX");