mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-21 22:50:08 +03:00
Fix null deref introduced with previous commit
Found by OSS-Fuzz.
This commit is contained in:
parent
01411e7c5e
commit
cbe1212db6
@ -228,7 +228,8 @@ xmlAddEntity(xmlDtdPtr dtd, const xmlChar *name, int type,
|
||||
int valid = 0;
|
||||
|
||||
/* 4.6 Predefined Entities */
|
||||
if (type == XML_INTERNAL_GENERAL_ENTITY) {
|
||||
if ((type == XML_INTERNAL_GENERAL_ENTITY) &&
|
||||
(content != NULL)) {
|
||||
int c = predef->content[0];
|
||||
|
||||
if (((content[0] == c) && (content[1] == 0)) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user