From: Rhodri James Date: Tue, 25 Apr 2017 17:24:09 +0000 (+0100) Subject: Validate parser parameter to XML_GetErrorCode X-Git-Tag: R_2_2_1~51^2~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c365fc049c7e09bddb0a01d379d84093fbb9a59;p=libexpat Validate parser parameter to XML_GetErrorCode --- diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index 6b4e5868..c64d0a64 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -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; }