]> granicus.if.org Git - libexpat/commitdiff
Validate parser parameter to XML_SetEndDoctypeDeclHandler
authorRhodri James <rhodri@kynesim.co.uk>
Tue, 25 Apr 2017 16:29:43 +0000 (17:29 +0100)
committerSebastian Pipping <sebastian@pipping.org>
Wed, 24 May 2017 18:49:39 +0000 (20:49 +0200)
expat/lib/xmlparse.c

index dad0b468f3684170400397bca73c2c9c3a9473be..8f71fcab8f03d185fd151e638a7ea2f4ee35a5c5 100644 (file)
@@ -1492,7 +1492,8 @@ XML_SetStartDoctypeDeclHandler(XML_Parser parser,
 void XMLCALL
 XML_SetEndDoctypeDeclHandler(XML_Parser parser,
                              XML_EndDoctypeDeclHandler end) {
-  endDoctypeDeclHandler = end;
+  if (parser != NULL)
+    endDoctypeDeclHandler = end;
 }
 
 void XMLCALL