From 9edd29c882e0a29177a4188e96fd1a1b065e25ba Mon Sep 17 00:00:00 2001 From: Fan Jiang Date: Sun, 19 Oct 2025 20:51:53 -0700 Subject: [PATCH] Fix a use-after-free in the Rust bindings --- uc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/uc.c b/uc.c index 75b89a0176..9402fa0d37 100644 --- a/uc.c +++ b/uc.c @@ -2051,6 +2051,7 @@ uc_err uc_hook_del(uc_engine *uc, uc_hook hh) uc); g_hash_table_remove_all(hook->hooked_regions); hook->to_delete = true; + hook->user_data = NULL; uc->hooks_count[i]--; hook_append(&uc->hooks_to_del, hook); }