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

index 743fbdc3680c3cc6d0108c446fb1937fed1237a1..c45afaa24b18d447769a0df4ee8225da07155d70 100644 (file)
@@ -1533,7 +1533,8 @@ XML_SetStartNamespaceDeclHandler(XML_Parser parser,
 void XMLCALL
 XML_SetEndNamespaceDeclHandler(XML_Parser parser,
                                XML_EndNamespaceDeclHandler end) {
-  endNamespaceDeclHandler = end;
+  if (parser != NULL)
+    endNamespaceDeclHandler = end;
 }
 
 void XMLCALL