Skip to content
This repository was archived by the owner on Mar 22, 2024. It is now read-only.

Commit db6a240

Browse files
authored
Revert "afl-clang-fast: default AFL_PATH (#66)" (#67)
This reverts commit 36fc97a.
1 parent 36fc97a commit db6a240

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

llvm_mode/afl-clang-fast.c

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,22 @@ static void find_obj(u8* argv0) {
5252
u8 *afl_path = getenv("AFL_PATH");
5353
u8 *slash, *tmp;
5454

55-
if (!afl_path)
56-
afl_path = "/usr/local/lib/afl";
55+
if (afl_path) {
56+
57+
tmp = alloc_printf("%s/afl-llvm-rt.o", afl_path);
58+
59+
if (!access(tmp, R_OK)) {
60+
obj_path = afl_path;
61+
ck_free(tmp);
62+
return;
63+
}
5764

58-
tmp = alloc_printf("%s/afl-llvm-rt.o", afl_path);
59-
if (!access(tmp, R_OK)) {
60-
obj_path = afl_path;
6165
ck_free(tmp);
62-
return;
66+
6367
}
64-
ck_free(tmp);
6568

6669
slash = strrchr(argv0, '/');
70+
6771
if (slash) {
6872

6973
u8 *dir;

0 commit comments

Comments
 (0)