fx: namemap: fix nullptr deference in fx_namemap_first
This commit is contained in:
@@ -141,6 +141,10 @@ struct fx_namemap_entry *fx_namemap_first(const struct fx_namemap *map)
|
|||||||
struct __fx_namemap_entry,
|
struct __fx_namemap_entry,
|
||||||
first,
|
first,
|
||||||
e_node);
|
e_node);
|
||||||
|
if (!entry) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (entry->e_flags == MAP_ENTRY_ITEM) {
|
if (entry->e_flags == MAP_ENTRY_ITEM) {
|
||||||
return (struct fx_namemap_entry *)entry;
|
return (struct fx_namemap_entry *)entry;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user