about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2024-09-06 11:48:34 +0200
committerGitHub <noreply@github.com>2024-09-06 11:48:34 +0200
commitbf46ff88231dbc9ebd4cffc3565d77ef92054710 (patch)
treed2826d280f575f5066c443b72ae2eb2e43f88c33 /src
parentdfc9b3dba0375ed5f14e1d637bd845cda624042e (diff)
parentb8cb35fa8c52300b3387a82efc0ca5480147d1d1 (diff)
downloadafl++-bf46ff88231dbc9ebd4cffc3565d77ef92054710.tar.gz
Merge pull request #2202 from smoelius/permissive_create-in-mark_as_variable
Use `permissive_create` in `mark_as_variable`
Diffstat (limited to 'src')
-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 599d31f6..8db89775 100644
--- a/src/afl-fuzz-queue.c
+++ b/src/afl-fuzz-queue.c
@@ -455,9 +455,8 @@ void mark_as_variable(afl_state_t *afl, struct queue_entry *q) {
 
   if (symlink(ldest, fn)) {
 
-    s32 fd = open(fn, O_WRONLY | O_CREAT | O_EXCL, DEFAULT_PERMISSION);
-    if (fd < 0) { PFATAL("Unable to create '%s'", fn); }
-    close(fd);
+    s32 fd = permissive_create(afl, fn);
+    if (fd >= 0) { close(fd); }
 
   }