From 43c0f8bb3d41250d6b566e6cb5b9a5c79e36aae3 Mon Sep 17 00:00:00 2001 From: Martin Mory Date: Sun, 15 Jan 2023 23:03:41 +0100 Subject: [PATCH] Remove whitespace between a tag and the first number, otherwise first call to strtoul10() returns 0 and the indices are broken, leading to possible out-of-bound access and memory corruption/crash --- code/AssetLib/Collada/ColladaParser.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/code/AssetLib/Collada/ColladaParser.cpp b/code/AssetLib/Collada/ColladaParser.cpp index 91f32f485..cce6a0db6 100644 --- a/code/AssetLib/Collada/ColladaParser.cpp +++ b/code/AssetLib/Collada/ColladaParser.cpp @@ -762,6 +762,7 @@ void ColladaParser::ReadControllerWeights(XmlNode &node, Collada::Controller &pC if (text == nullptr) { throw DeadlyImportError("Out of data while reading "); } + SkipSpacesAndLineEnd(&text); it->first = strtoul10(text, &text); SkipSpacesAndLineEnd(&text); if (*text == 0) {