diff options
author | hexcoder- <heiko@hexco.de> | 2021-02-13 23:29:04 +0100 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2021-02-13 23:29:04 +0100 |
commit | e45333bcf96f86b5ef0b905a8e84fad7b7cb0427 (patch) | |
tree | 30deaa24dbcc759bf03df3b1043ef1ca69f89089 /src/afl-analyze.c | |
parent | c906c042be926652aa2e2d9fb4886ee03f5d86c2 (diff) | |
parent | 9bd1e19d7f004b4da6a610b07e59f99d66bb7ec2 (diff) | |
download | afl++-e45333bcf96f86b5ef0b905a8e84fad7b7cb0427.tar.gz |
Merge branch 'dev' of https://github.com/AFLplusplus/AFLplusplus into dev
Diffstat (limited to 'src/afl-analyze.c')
-rw-r--r-- | src/afl-analyze.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/afl-analyze.c b/src/afl-analyze.c index 8fc4434a..20aef2da 100644 --- a/src/afl-analyze.c +++ b/src/afl-analyze.c @@ -26,9 +26,6 @@ #define AFL_MAIN -#ifdef __ANDROID__ - #include "android-ashmem.h" -#endif #include "config.h" #include "types.h" #include "debug.h" @@ -1081,6 +1078,31 @@ 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"); |