From df379dfcf46941125bc6b8f9d3e2e1141b84e137 Mon Sep 17 00:00:00 2001 From: van Hauser Date: Tue, 10 Sep 2019 21:01:33 +0200 Subject: no more unlink --- src/afl-fuzz-run.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/afl-fuzz-run.c') diff --git a/src/afl-fuzz-run.c b/src/afl-fuzz-run.c index 3c3a1d37..37a04e44 100644 --- a/src/afl-fuzz-run.c +++ b/src/afl-fuzz-run.c @@ -253,9 +253,9 @@ 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_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 @@ 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_EXCL, 0600); + fd = open(out_file, O_WRONLY | O_CREAT | O_TRUNC, 0600); if (fd < 0) PFATAL("Unable to create '%s'", out_file); -- cgit 1.4.1