about summary refs log tree commit diff
path: root/src/afl-fuzz-queue.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2024-05-13 19:32:44 +0200
committerGitHub <noreply@github.com>2024-05-13 19:32:44 +0200
commit0cabc12f91bd6a57b0496d59c137efb5a0247c61 (patch)
treedceabf0bf8006343c1591135109d0585e2c73463 /src/afl-fuzz-queue.c
parentb282ce999d2ab9428210deb0e838f45a6a534084 (diff)
parentc03f2897d081b2bf41e179a48d758f1f400b5929 (diff)
downloadafl++-0cabc12f91bd6a57b0496d59c137efb5a0247c61.tar.gz
Merge pull request #2086 from smoelius/dev
Add `AFL_SHA1_FILENAMES` option
Diffstat (limited to 'src/afl-fuzz-queue.c')
-rw-r--r--src/afl-fuzz-queue.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/afl-fuzz-queue.c b/src/afl-fuzz-queue.c
index 5987ad0c..2318df60 100644
--- a/src/afl-fuzz-queue.c
+++ b/src/afl-fuzz-queue.c
@@ -371,9 +371,8 @@ void mark_as_redundant(afl_state_t *afl, struct queue_entry *q, u8 state) {
     s32 fd;
 
     if (unlikely(afl->afl_env.afl_disable_redundant)) { q->disabled = 1; }
-    fd = open(fn, O_WRONLY | O_CREAT | O_EXCL, DEFAULT_PERMISSION);
-    if (fd < 0) { PFATAL("Unable to create '%s'", fn); }
-    close(fd);
+    fd = permissive_create(afl, fn);
+    if (fd >= 0) { close(fd); }
 
   } else {