From cee9a7d01111de7c70f2881656139576db021d67 Mon Sep 17 00:00:00 2001 From: Ryan Hileman Date: Mon, 25 Jan 2016 03:51:35 -0800 Subject: [PATCH] fix missing HOOK_CODE bound check --- uc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uc.c b/uc.c index b0f8a976..1d1ed539 100644 --- a/uc.c +++ b/uc.c @@ -1023,7 +1023,9 @@ void helper_uc_tracecode(int32_t size, uc_hook_type type, void *handle, int64_t while (cur != NULL && !uc->stop_request) { hook = (struct hook *)cur->data; - ((uc_cb_hookcode_t)hook->callback)(uc, address, size, hook->user_data); + if (HOOK_BOUND_CHECK(hook, address)) { + ((uc_cb_hookcode_t)hook->callback)(uc, address, size, hook->user_data); + } cur = cur->next; } }