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

index 8b46f09cfc1f37cb5c404cc9c4fd3ddc83d1e031..7877df4a6b6ece80e66335600e86fff05c8ed2ad 100644 (file)
@@ -1935,6 +1935,8 @@ XML_GetBuffer(XML_Parser parser, int len)
 enum XML_Status XMLCALL
 XML_StopParser(XML_Parser parser, XML_Bool resumable)
 {
+  if (parser == NULL)
+    return XML_STATUS_ERROR;
   switch (ps_parsing) {
   case XML_SUSPENDED:
     if (resumable) {