assimp/CVE-2025-3159.patch
changtao 9e6f57bc34 fix CVE-2025-3160
(cherry picked from commit 7e47ef0650b2962d2a9a07cac58d94b5a1911a7d)
2025-04-07 10:38:58 +08:00

29 lines
1.3 KiB
Diff

From e8a6286542924e628e02749c4f5ac4f91fdae71b Mon Sep 17 00:00:00 2001
From: Kim Kulling <kimkulling@users.noreply.github.com>
Date: Thu, 13 Mar 2025 16:23:36 +0100
Subject: [PATCH] ASE: Use correct vertex container (#6051)
- closes https://github.com/assimp/assimp/issues/6024
---
code/AssetLib/ASE/ASEParser.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/AssetLib/ASE/ASEParser.cpp b/code/AssetLib/ASE/ASEParser.cpp
index c43eb42..f697861 100644
--- a/code/AssetLib/ASE/ASEParser.cpp
+++ b/code/AssetLib/ASE/ASEParser.cpp
@@ -1382,8 +1382,8 @@ void Parser::ParseLV4MeshBonesVertices(unsigned int iNumVertices, ASE::Mesh &mes
if (TokenMatch(filePtr, "MESH_BONE_VERTEX", 16)) {
// read the vertex index
unsigned int iIndex = strtoul10(filePtr, &filePtr);
- if (iIndex >= mesh.mPositions.size()) {
- iIndex = (unsigned int)mesh.mPositions.size() - 1;
+ if (iIndex >= mesh.mBoneVertices.size()) {
+ iIndex = (unsigned int)mesh.mBoneVertices.size() - 1;
LogWarning("Bone vertex index is out of bounds. Using the largest valid "
"bone vertex index instead");
}
--
2.41.0