Fix UC_MODE_AFL and update config

This commit is contained in:
2021-10-25 14:39:40 +02:00
parent d965c0f159
commit 1fa2eb688b
13 changed files with 83 additions and 19 deletions

7
uc.c
View File

@@ -162,6 +162,11 @@ uc_err uc_open(uc_arch arch, uc_mode mode, uc_engine **result)
return UC_ERR_NOMEM;
}
if (mode & UC_MODE_AFL) {
uc->afl = true;
mode &= (~UC_MODE_AFL);
}
/* qemu/exec.c: phys_map_node_reserve() */
uc->alloc_hint = 16;
uc->errnum = UC_ERR_OK;
@@ -937,7 +942,7 @@ uc_err uc_afl_fuzz(
UCLOG(stderr, "[!] Unicorn Engine passed to uc_afl_fuzz is NULL!\n");
return UC_ERR_AFL_RET_ERROR;
}
if (!(uc->mode & UC_MODE_AFL)) {
if (!(uc->afl)) {
return UC_ERR_MODE;
}
if (!input_file || input_file[0] == 0) {