afl-showmap don't create empty "-" file
diff --git a/src/afl-showmap.c b/src/afl-showmap.c
index 75b0ff9..a04c1f5 100644
--- a/src/afl-showmap.c
+++ b/src/afl-showmap.c
@@ -242,9 +242,11 @@
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;
}