1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-23 02:50:08 +03:00

dict: Fix null-deref with empty subdict

Short lived regression found by OSS-Fuzz.
This commit is contained in:
Nick Wellnhofer 2023-09-30 17:05:47 +02:00
parent 61e29b6949
commit f0a703dac8

2
dict.c
View File

@ -679,7 +679,7 @@ xmlDictLookupInternal(xmlDictPtr dict, const xmlChar *prefix,
if (found)
return(entry);
if (dict->subdict != NULL) {
if ((dict->subdict != NULL) && (dict->subdict->size > 0)) {
xmlDictEntry *subEntry;
unsigned subHashValue;