From ed4a70c6189a4670bcb8a20c4ec0a82245a4c017 Mon Sep 17 00:00:00 2001 From: Dominik Maier Date: Wed, 19 Feb 2020 16:02:54 +0100 Subject: fixed -A in afl-showmap --- src/afl-showmap.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/afl-showmap.c b/src/afl-showmap.c index 95c4592d..cd4f2b7b 100644 --- a/src/afl-showmap.c +++ b/src/afl-showmap.c @@ -80,7 +80,7 @@ u8 *out_file, /* Trace output file */ *stdin_file, /* stdin file */ *in_dir, /* input folder */ *doc_path, /* Path to docs */ - *at_file; /* Substitution string for @@ */ + *at_file = NULL; /* Substitution string for @@ */ static u8* in_data; /* Input data */ @@ -901,11 +901,13 @@ int main(int argc, char** argv, char** envp) { if (in_dir) { if (at_file) PFATAL("Options -A and -i are mutually exclusive"); - at_file = "@@"; + detect_file_args(argv + optind, ""); - } + } else { - detect_file_args(argv + optind, ""); + detect_file_args(argv + optind, at_file); + + } for (i = optind; i < argc; i++) if (strcmp(argv[i], "@@") == 0) arg_offset = i; -- cgit 1.4.1