From abe452babc13299f598a47f7c87873a4ae34bf09 Mon Sep 17 00:00:00 2001 From: Sunho Kim Date: Thu, 10 Sep 2020 11:03:36 +0900 Subject: [PATCH] Fix enabled hooks even after deleting them (#1315) --- include/uc_priv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uc_priv.h b/include/uc_priv.h index 80288187..833a4238 100644 --- a/include/uc_priv.h +++ b/include/uc_priv.h @@ -127,7 +127,7 @@ enum uc_hook_idx { // if statement to check hook bounds #define HOOK_BOUND_CHECK(hh, addr) \ ((((addr) >= (hh)->begin && (addr) <= (hh)->end) \ - || (hh)->begin > (hh)->end)) + || (hh)->begin > (hh)->end) && !((hh)->to_delete)) #define HOOK_EXISTS(uc, idx) ((uc)->hook[idx##_IDX].head != NULL) #define HOOK_EXISTS_BOUNDED(uc, idx, addr) _hook_exists_bounded((uc)->hook[idx##_IDX].head, addr)