diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-12-17 10:18:08 -0200 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-12-17 10:18:08 -0200 |
commit | 0c3f14087cfc2ac10af62aac7cae9b12fd501b9a (patch) | |
tree | dcdc35cfc6081087e56ef5ae70cb3f07d4f3a3c1 | |
parent | 8347e008c2a23a7bab6b7847d02204c0cee54fb0 (diff) | |
parent | 378fb0bacec858847734452c080afb30eb308d7a (diff) |
Merge pull request #984 from orbitcowboy/master
xml_parser: check array length index before accessing the array.
-rw-r--r-- | core/io/xml_parser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/io/xml_parser.cpp b/core/io/xml_parser.cpp index 6306d22368..1d69f8e5e7 100644 --- a/core/io/xml_parser.cpp +++ b/core/io/xml_parser.cpp @@ -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; |