From eca1d097e199c483b38a02026b8c475bf075f542 Mon Sep 17 00:00:00 2001 From: Rhodri James Date: Tue, 25 Apr 2017 17:22:19 +0100 Subject: [PATCH] Validate parser parameter to XML_SetDefaultHandlerExpand --- expat/lib/xmlparse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index b91191e6..2de26ba2 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -1465,6 +1465,8 @@ void XMLCALL XML_SetDefaultHandlerExpand(XML_Parser parser, XML_DefaultHandler handler) { + if (parser == NULL) + return; defaultHandler = handler; defaultExpandInternalEntities = XML_TRUE; } -- 2.40.0