about summary refs log tree commit diff
path: root/src/afl-showmap.c
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2021-10-19 13:59:38 +0200
committerAndrea Fioraldi <andreafioraldi@gmail.com>2021-10-19 13:59:38 +0200
commit23e69f11075b20c4907ebe902af08dcbb13ec175 (patch)
tree9bd59c8786c8a81370373484778c0aeb1770d095 /src/afl-showmap.c
parent77a63d8ccfd4b409c35227e174f1d6e809256e41 (diff)
parentbb8a4d71da8f2b748a78ccc4416df6bffb393d80 (diff)
downloadafl++-23e69f11075b20c4907ebe902af08dcbb13ec175.tar.gz
Merge branch 'dev' of github.com:AFLplusplus/AFLplusplus into dev
Diffstat (limited to 'src/afl-showmap.c')
-rw-r--r--src/afl-showmap.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/afl-showmap.c b/src/afl-showmap.c
index 75b0ff99..5df07bf2 100644
--- a/src/afl-showmap.c
+++ b/src/afl-showmap.c
@@ -242,9 +242,14 @@ static u32 write_results_to_file(afl_forkserver_t *fsrv, u8 *outfile) {
   if (cmin_mode &&
       (fsrv->last_run_timed_out || (!caa && child_crashed != cco))) {
 
-    // create empty file to prevent error messages in afl-cmin
-    fd = open(outfile, O_WRONLY | O_CREAT | O_EXCL, DEFAULT_PERMISSION);
-    close(fd);
+    if (strcmp(outfile, "-")) {
+
+      // create empty file to prevent error messages in afl-cmin
+      fd = open(outfile, O_WRONLY | O_CREAT | O_EXCL, DEFAULT_PERMISSION);
+      close(fd);
+
+    }
+
     return ret;
 
   }