From 6526d78e37ea78d2bcd7b331f2b3a3566a1f0128 Mon Sep 17 00:00:00 2001 From: pancake Date: Sun, 1 Dec 2024 17:08:24 +0100 Subject: [PATCH] Fix null deref deleting plugins from the hashtable --- libr/util/lib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libr/util/lib.c b/libr/util/lib.c index 36b84b9395ecd..177fd6e89a802 100644 --- a/libr/util/lib.c +++ b/libr/util/lib.c @@ -217,9 +217,11 @@ R_API RLibHandler *r_lib_get_handler(RLib *lib, int type) { } static int delete_plugin(RLib *lib, RLibPlugin *plugin) { - int ret = -1; bool found; + if (plugin->name == NULL) { + return -1; + } ht_pp_find (lib->plugins_ht, plugin->name, &found); if (found) { ht_pp_delete (lib->plugins_ht, plugin->name);