Merge pull request #984 from orbitcowboy/master
xml_parser: check array length index before accessing the array.
This commit is contained in:
commit
0c3f14087c
1 changed files with 1 additions and 1 deletions
|
@ -34,7 +34,7 @@ VARIANT_ENUM_CAST(XMLParser::NodeType);
|
|||
|
||||
static bool _equalsn(const CharType* str1, const CharType* str2, int len) {
|
||||
int i;
|
||||
for(i=0; str1[i] && str2[i] && i < len; ++i)
|
||||
for(i=0; i < len && str1[i] && str2[i] ; ++i)
|
||||
if (str1[i] != str2[i])
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue