Skip to content

Commit

Permalink
Fix null deref deleting plugins from the hashtable
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Dec 1, 2024
1 parent fe02e1f commit 6526d78
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libr/util/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6526d78

Please sign in to comment.