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

index c45afaa24b18d447769a0df4ee8225da07155d70..9cd124ba20278fb26bff0d978a185409b2c6049c 100644 (file)
@@ -1541,7 +1541,8 @@ void XMLCALL
 XML_SetNotStandaloneHandler(XML_Parser parser,
                             XML_NotStandaloneHandler handler)
 {
-  notStandaloneHandler = handler;
+  if (parser != NULL)
+    notStandaloneHandler = handler;
 }
 
 void XMLCALL