mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-07 14:09:26 +00:00
Reject negative length call to XML_Parse
This commit is contained in:
parent
6a747c837c
commit
70db8d2538
1 changed files with 1 additions and 1 deletions
|
@ -1648,7 +1648,7 @@ XML_SetHashSalt(XML_Parser parser,
|
|||
enum XML_Status XMLCALL
|
||||
XML_Parse(XML_Parser parser, const char *s, int len, int isFinal)
|
||||
{
|
||||
if ((parser == NULL) || ((s == NULL) && (len != 0))) {
|
||||
if ((parser == NULL) || (len < 0) || ((s == NULL) && (len != 0))) {
|
||||
errorCode = XML_ERROR_INVALID_ARGUMENT;
|
||||
return XML_STATUS_ERROR;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue