diff options
-rw-r--r-- | docs/ChangeLog | 7 | ||||
-rw-r--r-- | src/afl-fuzz-run.c | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/docs/ChangeLog b/docs/ChangeLog index 8c799c44..f073123c 100644 --- a/docs/ChangeLog +++ b/docs/ChangeLog @@ -13,6 +13,13 @@ Want to stay in the loop on major new features? Join our mailing list by sending a mail to <afl-users+subscribe@googlegroups.com>. +---------------------- +Version ++2.57d (dev): +---------------------- + + - revertedd patch to not unlink and recreate the input file, it resulted in performance loss + + -------------------------------- Version ++2.54d-2.57c (release): -------------------------------- diff --git a/src/afl-fuzz-run.c b/src/afl-fuzz-run.c index 46d12423..fc235b27 100644 --- a/src/afl-fuzz-run.c +++ b/src/afl-fuzz-run.c @@ -288,10 +288,10 @@ void write_to_testcase(void* mem, u32 len) { if (out_file) { - // unlink(out_file); /* Ignore errors. + unlink(out_file); /* Ignore errors. // */ - fd = open(out_file, O_WRONLY | O_CREAT | O_TRUNC, 0600); + fd = open(out_file, O_WRONLY | O_CREAT | O_EXCL, 0600); if (fd < 0) PFATAL("Unable to create '%s'", out_file); @@ -331,10 +331,10 @@ void write_with_gap(void* mem, u32 len, u32 skip_at, u32 skip_len) { if (out_file) { - // unlink(out_file); /* Ignore errors. + unlink(out_file); /* Ignore errors. // */ - fd = open(out_file, O_WRONLY | O_CREAT | O_TRUNC, 0600); + fd = open(out_file, O_WRONLY | O_CREAT | O_EXCL, 0600); if (fd < 0) PFATAL("Unable to create '%s'", out_file); |