From 6b0a7a21a436cfff9368742a85e65b3f94930926 Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Mon, 23 May 2022 14:24:56 +0800 Subject: [PATCH 1/3] Store SID in SID field Signed-off-by: Luca Della Vedova --- code/AssetLib/Collada/ColladaParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/AssetLib/Collada/ColladaParser.cpp b/code/AssetLib/Collada/ColladaParser.cpp index 922d1f6b2..9b3af0848 100644 --- a/code/AssetLib/Collada/ColladaParser.cpp +++ b/code/AssetLib/Collada/ColladaParser.cpp @@ -2057,7 +2057,7 @@ void ColladaParser::ReadSceneNode(XmlNode &node, Node *pNode) { XmlParser::getStdStrAttribute(currentNode, "id", child->mID); } if (XmlParser::hasAttribute(currentNode, "sid")) { - XmlParser::getStdStrAttribute(currentNode, "id", child->mSID); + XmlParser::getStdStrAttribute(currentNode, "sid", child->mSID); } if (XmlParser::hasAttribute(currentNode, "name")) { XmlParser::getStdStrAttribute(currentNode, "name", child->mName); From d109db152c1bcd9d4d5c5bf8115feb95811d199e Mon Sep 17 00:00:00 2001 From: Koekto-code <97475827+Koekto-code@users.noreply.github.com> Date: Sat, 9 Jul 2022 15:32:24 +0300 Subject: [PATCH 2/3] Use winresrc.h for mingw --- tools/assimp_cmd/assimp_cmd.rc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/assimp_cmd/assimp_cmd.rc b/tools/assimp_cmd/assimp_cmd.rc index 94572b7e0..2ead81bcb 100644 --- a/tools/assimp_cmd/assimp_cmd.rc +++ b/tools/assimp_cmd/assimp_cmd.rc @@ -1,5 +1,9 @@ #include "revision.h" -#include "winres.h" +#if defined(__GNUC__) && defined(_WIN32) + #include "winresrc.h" +#else + #include "winres.h" +#endif LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) From 0c07ea7c7117a8831289f843c5bae2ad628e9579 Mon Sep 17 00:00:00 2001 From: sashashura <93376818+sashashura@users.noreply.github.com> Date: Sat, 16 Jul 2022 13:44:46 +0100 Subject: [PATCH 3/3] Fixes Heap-buffer-overflow in SuperFastHash --- code/AssetLib/LWS/LWSLoader.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/AssetLib/LWS/LWSLoader.cpp b/code/AssetLib/LWS/LWSLoader.cpp index 951dbe180..abaaaa305 100644 --- a/code/AssetLib/LWS/LWSLoader.cpp +++ b/code/AssetLib/LWS/LWSLoader.cpp @@ -313,6 +313,9 @@ void LWSImporter::SetupNodeName(aiNode *nd, LWS::NodeDesc &src) { std::string::size_type t = src.path.substr(s).find_last_of('.'); nd->mName.length = ::ai_snprintf(nd->mName.data, MAXLEN, "%s_(%08X)", src.path.substr(s).substr(0, t).c_str(), combined); + if (nd->mName.length > MAXLEN) { + nd->mName.length = MAXLEN; + } return; } }