From 2315924f2a875b56d40af7b3fc8f6abdb60ef3dc Mon Sep 17 00:00:00 2001 From: Rhodri James Date: Tue, 25 Apr 2017 17:27:00 +0100 Subject: [PATCH] Validate parser parameter to XML_SetDoctypeDeclHandler --- expat/lib/xmlparse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index 2de26ba2..40590e7f 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -1476,6 +1476,8 @@ XML_SetDoctypeDeclHandler(XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end) { + if (parser == NULL) + return; startDoctypeDeclHandler = start; endDoctypeDeclHandler = end; }