1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-23 01:52:48 +03:00

valid: Add NULL check in xmlCtxtValidateDtd

This commit is contained in:
Nick Wellnhofer
2024-11-17 13:20:06 +01:00
parent 631778f679
commit 1e1731a43d

View File

@@ -6495,6 +6495,8 @@ xmlValidateDtd(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlDtdPtr dtd) {
*/ */
int int
xmlCtxtValidateDtd(xmlParserCtxtPtr ctxt, xmlDocPtr doc, xmlDtdPtr dtd) { xmlCtxtValidateDtd(xmlParserCtxtPtr ctxt, xmlDocPtr doc, xmlDtdPtr dtd) {
if (ctxt == NULL)
return(0);
return(xmlValidateDtd(&ctxt->vctxt, doc, dtd)); return(xmlValidateDtd(&ctxt->vctxt, doc, dtd));
} }