diff options
author | van Hauser <vh@thc.org> | 2019-10-18 08:25:43 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2019-10-18 08:25:43 +0200 |
commit | 73da639654aa4e91220eb0adcbe380800b06a768 (patch) | |
tree | fee0f9f73238084bbbdb08b115bc17ba87fa1dc3 /src/afl-fuzz-run.c | |
parent | f2a1456e940949a1cb976795ff3bc054e0a3c3b5 (diff) | |
download | afl++-73da639654aa4e91220eb0adcbe380800b06a768.tar.gz |
revert patch
Diffstat (limited to 'src/afl-fuzz-run.c')
-rw-r--r-- | src/afl-fuzz-run.c | 8 |
1 files changed, 4 insertions, 4 deletions
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); |