From: Rhodri James Date: Tue, 25 Apr 2017 16:52:04 +0000 (+0100) Subject: Validate parser parameter to XML_SetXmlDeclHandler X-Git-Tag: R_2_2_1~51^2~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e5430d8a07a7edf7e8700579a62644b5ed87c355;p=libexpat Validate parser parameter to XML_SetXmlDeclHandler --- diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index 27accb22..3125c671 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -1610,7 +1610,8 @@ XML_SetEntityDeclHandler(XML_Parser parser, void XMLCALL XML_SetXmlDeclHandler(XML_Parser parser, XML_XmlDeclHandler handler) { - xmlDeclHandler = handler; + if (parser != NULL) + xmlDeclHandler = handler; } int XMLCALL