From e6e0d3e41fb50b25ef2026e25d3a7e152b900a6c Mon Sep 17 00:00:00 2001 From: Rhodri James Date: Tue, 25 Apr 2017 17:28:35 +0100 Subject: [PATCH] Validate parser parameter to XML_SetStartDoctypeDeclHandler --- expat/lib/xmlparse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index 40590e7f..dad0b468 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -1485,7 +1485,8 @@ XML_SetDoctypeDeclHandler(XML_Parser parser, void XMLCALL XML_SetStartDoctypeDeclHandler(XML_Parser parser, XML_StartDoctypeDeclHandler start) { - startDoctypeDeclHandler = start; + if (parser != NULL) + startDoctypeDeclHandler = start; } void XMLCALL -- 2.40.0