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

index 6b4e5868070ef49213db158db813ab133cd9a8a2..c64d0a647ac5ebce0c13e50d222347b9c817f8d9 100644 (file)
@@ -2016,6 +2016,8 @@ XML_GetParsingStatus(XML_Parser parser, XML_ParsingStatus *status)
 enum XML_Error XMLCALL
 XML_GetErrorCode(XML_Parser parser)
 {
+  if (parser == NULL)
+    return XML_ERROR_INVALID_ARGUMENT;
   return errorCode;
 }