about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDominik Maier <domenukk@gmail.com>2020-02-19 16:02:54 +0100
committerDominik Maier <domenukk@gmail.com>2020-02-19 16:02:54 +0100
commited4a70c6189a4670bcb8a20c4ec0a82245a4c017 (patch)
tree27f0467fe685208a2e4595c916a595a89fa059f9 /src
parentd49c4d641a4b3d6929bd97f7e6b433a71cef1920 (diff)
downloadafl++-ed4a70c6189a4670bcb8a20c4ec0a82245a4c017.tar.gz
fixed -A in afl-showmap
Diffstat (limited to 'src')
-rw-r--r--src/afl-showmap.c10
1 files changed, 6 insertions, 4 deletions
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;