Fix the sizemask for inline hooking

This commit is contained in:
lazymio 2021-11-23 21:18:21 +01:00
parent e11cc16e54
commit c1c5f72918
No known key found for this signature in database
GPG Key ID: DFF27E34A47CB873

View File

@ -679,7 +679,7 @@ void uc_add_inline_hook(uc_engine *uc, struct hook *hk, void** args, int args_le
case UC_HOOK_BLOCK:
case UC_HOOK_CODE:
// (*uc_cb_hookcode_t)(uc_engine *uc, uint64_t address, uint32_t size, void *user_data);
sizemask = dh_sizemask(void, 0) | dh_sizemask(i64, 1) | dh_sizemask(i32, 2) | dh_sizemask(void, 3);
sizemask = dh_sizemask(void, 0) | dh_sizemask(ptr, 1) | dh_sizemask(i64, 2) | dh_sizemask(i32, 3) | dh_sizemask(ptr, 4);
snprintf(name, 63, "hookcode_%d_%" PRIx64 , hk->type, (uint64_t)hk->callback);
break;