clearer code

This commit is contained in:
Dominik Maier
2020-04-17 11:01:14 +02:00
parent 23ea727915
commit 8fa5d4c313
2 changed files with 10 additions and 4 deletions

View File

@ -234,6 +234,7 @@ if [ "$ORIG_CPU_TARGET" = "" ]; then
unset AFL_INST_RATIO
echo "[*] Comparing two afl-showmap -Q outputs..."
echo 0 | ./afl-showmap -m none -Q -q -o .test-instr0 ./test-instr || exit 1
echo 1 | ./afl-showmap -m none -Q -q -o .test-instr1 ./test-instr || exit 1

View File

@ -222,10 +222,12 @@ char **get_qemu_argv(u8 *own_loc, u8 **target_path_p, int argc, char **argv) {
}
} else
} else {
ck_free(own_copy);
}
if (!access(BIN_PATH "/afl-qemu-trace", X_OK)) {
if (cp) ck_free(cp);
@ -389,16 +391,19 @@ u8 *find_binary(u8 *fname) {
memcpy(cur_elem, env_path, delim - env_path);
delim++;
} else
} else {
cur_elem = ck_strdup(env_path);
}
env_path = delim;
if (cur_elem[0])
if (cur_elem[0]) {
target_path = alloc_printf("%s/%s", cur_elem, fname);
else
} else {
target_path = ck_strdup(fname);
}
ck_free(cur_elem);