mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
parser: Check for malloc failure in xmlCtxtParseDtd
This commit is contained in:
parent
7f8c436c75
commit
631778f679
5
parser.c
5
parser.c
@ -11759,6 +11759,11 @@ xmlCtxtParseDtd(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
|
||||
ctxt->myDoc->properties = XML_DOC_INTERNAL;
|
||||
ctxt->myDoc->extSubset = xmlNewDtd(ctxt->myDoc, BAD_CAST "none",
|
||||
publicId, systemId);
|
||||
if (ctxt->myDoc->extSubset == NULL) {
|
||||
xmlErrMemory(ctxt);
|
||||
xmlFreeDoc(ctxt->myDoc);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
xmlDetectEncoding(ctxt);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user