Skip to content

Commit

Permalink
afl-clang-fast: default AFL_PATH (google#66)
Browse files Browse the repository at this point in the history
to /usr/local/lib/afl, as installed
  • Loading branch information
rurban authored and Dor1s committed Jan 6, 2020
1 parent 077d73f commit 36fc97a
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions llvm_mode/afl-clang-fast.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,18 @@ static void find_obj(u8* argv0) {
u8 *afl_path = getenv("AFL_PATH");
u8 *slash, *tmp;

if (afl_path) {

tmp = alloc_printf("%s/afl-llvm-rt.o", afl_path);

if (!access(tmp, R_OK)) {
obj_path = afl_path;
ck_free(tmp);
return;
}
if (!afl_path)
afl_path = "/usr/local/lib/afl";

tmp = alloc_printf("%s/afl-llvm-rt.o", afl_path);
if (!access(tmp, R_OK)) {
obj_path = afl_path;
ck_free(tmp);

return;
}
ck_free(tmp);

slash = strrchr(argv0, '/');

if (slash) {

u8 *dir;
Expand Down

0 comments on commit 36fc97a

Please sign in to comment.