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

index 548ec02a9a516ee93f1be63697a78dc7c618b6c3..29e68428d0256cfb5aed8e6e92a2f848515a0445 100644 (file)
@@ -1595,7 +1595,8 @@ void XMLCALL
 XML_SetAttlistDeclHandler(XML_Parser parser,
                           XML_AttlistDeclHandler attdecl)
 {
-  attlistDeclHandler = attdecl;
+  if (parser != NULL)
+    attlistDeclHandler = attdecl;
 }
 
 void XMLCALL