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

index 2f0c5b4fc978ff70924250beb38c14cee6840bc1..560e489a8b373a1912cce8ff44ec9ff77aeb67ec 100644 (file)
@@ -1398,7 +1398,8 @@ XML_SetStartElementHandler(XML_Parser parser,
 void XMLCALL
 XML_SetEndElementHandler(XML_Parser parser,
                          XML_EndElementHandler end) {
-  endElementHandler = end;
+  if (parser != NULL)
+    endElementHandler = end;
 }
 
 void XMLCALL