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

index 61598de848ae0e556c1d62da9b912689c0113bb7..07c962f640001ae6b60b5f9bb633f93d892d8ce0 100644 (file)
@@ -1447,7 +1447,8 @@ XML_SetStartCdataSectionHandler(XML_Parser parser,
 void XMLCALL
 XML_SetEndCdataSectionHandler(XML_Parser parser,
                               XML_EndCdataSectionHandler end) {
-  endCdataSectionHandler = end;
+  if (parser != NULL)
+    endCdataSectionHandler = end;
 }
 
 void XMLCALL