Merge pull request #984 from orbitcowboy/master

xml_parser: check array length index before accessing the array.
This commit is contained in:
Juan Linietsky 2014-12-17 10:18:08 -02:00
commit 0c3f14087c
1 changed files with 1 additions and 1 deletions

View File

@ -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;