fixed uaf and warnings

This commit is contained in:
Dominik Maier
2020-04-13 16:57:19 +02:00
parent dda096da03
commit 326ab632c3
12 changed files with 34 additions and 24 deletions

View File

@ -292,11 +292,10 @@ char **get_wine_argv(u8 *own_loc, u8 **target_path_p, int argc, char **argv) {
*rsl = 0;
cp = alloc_printf("%s/afl-qemu-trace", own_copy);
ck_free(own_copy);
if (!access(cp, X_OK)) {
if (cp && !access(cp, X_OK)) {
if (cp != NULL) ck_free(cp);
ck_free(cp);
cp = alloc_printf("%s/afl-wine-trace", own_copy);
@ -309,10 +308,14 @@ char **get_wine_argv(u8 *own_loc, u8 **target_path_p, int argc, char **argv) {
}
} else
ck_free(own_copy);
} else {
ck_free(own_copy);
}
u8 *ncp = BIN_PATH "/afl-qemu-trace";
if (!access(ncp, X_OK)) {