about summary refs log tree commit diff
path: root/src/afl-common.c
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-03-25 20:10:09 +0100
committervanhauser-thc <vh@thc.org>2021-03-25 20:10:09 +0100
commitc169cb3911b33fbc3974005788ade1c9218ade98 (patch)
tree7bf263a8a3a37813a4545b888efd4f9850286a61 /src/afl-common.c
parent00a53a870d7ccd24e13e6cb2bbbd7535964f7737 (diff)
downloadafl++-c169cb3911b33fbc3974005788ade1c9218ade98.tar.gz
integrate frida_mode, code-format
Diffstat (limited to 'src/afl-common.c')
-rw-r--r--src/afl-common.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/afl-common.c b/src/afl-common.c
index 087aa113..0fb1462e 100644
--- a/src/afl-common.c
+++ b/src/afl-common.c
@@ -336,7 +336,16 @@ u8 *find_afl_binary(u8 *own_loc, u8 *fname) {
 
   }
 
-  target_path = alloc_printf("%s/%s", BIN_PATH, fname);
+  if (perm == X_OK) {
+
+    target_path = alloc_printf("%s/%s", BIN_PATH, fname);
+
+  } else {
+
+    target_path = alloc_printf("%s/%s", AFL_PATH, fname);
+
+  }
+
   if (!access(target_path, perm)) {
 
     return target_path;