xml_parser: check array length index before accessing the array.

This commit is contained in:
orbitcowboy 2014-12-16 21:16:48 +01:00
parent c8b2a5f64a
commit 378fb0bace
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;