about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-05-30 02:04:37 +0200
committervanhauser-thc <vh@thc.org>2021-05-30 02:04:37 +0200
commitc78762e690ff936c2e5394aff87deeb7b6b67a6c (patch)
treee6ce48f481b553108eecc21609f826d33372c7c5
parentd2e85cce5048f36aef27a26d907670dda61837e4 (diff)
downloadafl++-c78762e690ff936c2e5394aff87deeb7b6b67a6c.tar.gz
fix for afl-showmap
-rw-r--r--src/afl-showmap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/afl-showmap.c b/src/afl-showmap.c
index d7af668c..96b72dd9 100644
--- a/src/afl-showmap.c
+++ b/src/afl-showmap.c
@@ -235,6 +235,9 @@ 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);
     return ret;
 
   }