Fix enabled hooks even after deleting them (#1315)

This commit is contained in:
Sunho Kim 2020-09-10 11:03:36 +09:00 committed by GitHub
parent c1c0baec7d
commit abe452babc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)