Skip to content

Commit 9edd29c

Browse files
committed
Fix a use-after-free in the Rust bindings
1 parent c24c9eb commit 9edd29c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

uc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2051,6 +2051,7 @@ uc_err uc_hook_del(uc_engine *uc, uc_hook hh)
20512051
uc);
20522052
g_hash_table_remove_all(hook->hooked_regions);
20532053
hook->to_delete = true;
2054+
hook->user_data = NULL;
20542055
uc->hooks_count[i]--;
20552056
hook_append(&uc->hooks_to_del, hook);
20562057
}

0 commit comments

Comments
 (0)