aboutsummaryrefslogtreecommitdiff
path: root/src/afl-showmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/afl-showmap.c')
-rw-r--r--src/afl-showmap.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/afl-showmap.c b/src/afl-showmap.c
index 5a0b6ecf..f3cd5a90 100644
--- a/src/afl-showmap.c
+++ b/src/afl-showmap.c
@@ -942,6 +942,31 @@ int main(int argc, char **argv_orig, char **envp) {
}
if (optind == argc || !out_file) { usage(argv[0]); }
+
+ if (fsrv->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);
+
+ }
if (in_dir) {