You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
xml_parser: check array length index before accessing the array.
This commit is contained in:
@@ -34,7 +34,7 @@ VARIANT_ENUM_CAST(XMLParser::NodeType);
|
|||||||
|
|
||||||
static bool _equalsn(const CharType* str1, const CharType* str2, int len) {
|
static bool _equalsn(const CharType* str1, const CharType* str2, int len) {
|
||||||
int i;
|
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])
|
if (str1[i] != str2[i])
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user