no more unlink
diff --git a/docs/ChangeLog b/docs/ChangeLog
index 31fa167..a407e25 100644
--- a/docs/ChangeLog
+++ b/docs/ChangeLog
@@ -17,7 +17,9 @@
Version ++2.54d (dev):
----------------------
- - ... your patch? :)
+ - no more unlinking the input file, this way the input file can also be a
+ FIFO or disk partition
+ - reducing duplicate code in afl-fuzz
--------------------------
diff --git a/src/afl-fuzz-run.c b/src/afl-fuzz-run.c
index 3c3a1d3..37a04e4 100644
--- a/src/afl-fuzz-run.c
+++ b/src/afl-fuzz-run.c
@@ -253,9 +253,9 @@
if (out_file) {
- unlink(out_file); /* Ignore errors. */
+ //unlink(out_file); /* Ignore errors. */
- fd = open(out_file, O_WRONLY | O_CREAT | O_EXCL, 0600);
+ fd = open(out_file, O_WRONLY | O_CREAT | O_TRUNC, 0600);
if (fd < 0) PFATAL("Unable to create '%s'", out_file);
@@ -295,9 +295,9 @@
if (out_file) {
- unlink(out_file); /* Ignore errors. */
+ //unlink(out_file); /* Ignore errors. */
- fd = open(out_file, O_WRONLY | O_CREAT | O_EXCL, 0600);
+ fd = open(out_file, O_WRONLY | O_CREAT | O_TRUNC, 0600);
if (fd < 0) PFATAL("Unable to create '%s'", out_file);