diff options
author | Andy Nichols <andy.nichols@qt.io> | 2025-06-10 12:58:18 +0200 |
---|---|---|
committer | Andy Nichols <andy.nichols@qt.io> | 2025-06-10 12:59:03 +0200 |
commit | 488a2f7af2920295ada886f113a0d563dab79b8d (patch) | |
tree | 60618a0947d45081caf6c5038cee9706e4af4ae0 /code/AssetLib/ASE/ASELoader.cpp | |
parent | 647f94648c0ae24b9c6684383a9dbbc0e2fc23b7 (diff) | |
parent | fb375dd8c0a032106a2122815fb18dffe0283721 (diff) |
Merge tag 'v6.0.2' into qt6_assimpqt6_assimp
Change-Id: I70ab8ef899f760cfa3ef8406419ecdb976d6ffc3
Diffstat (limited to 'code/AssetLib/ASE/ASELoader.cpp')
-rw-r--r-- | code/AssetLib/ASE/ASELoader.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/code/AssetLib/ASE/ASELoader.cpp b/code/AssetLib/ASE/ASELoader.cpp index c5f2eba32..c63edcf6b 100644 --- a/code/AssetLib/ASE/ASELoader.cpp +++ b/code/AssetLib/ASE/ASELoader.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2024, assimp team +Copyright (c) 2006-2025, assimp team All rights reserved. @@ -731,6 +731,10 @@ void ASEImporter::BuildUniqueRepresentation(ASE::Mesh &mesh) { unsigned int iCurrent = 0, fi = 0; for (std::vector<ASE::Face>::iterator i = mesh.mFaces.begin(); i != mesh.mFaces.end(); ++i, ++fi) { for (unsigned int n = 0; n < 3; ++n, ++iCurrent) { + const uint32_t curIndex = (*i).mIndices[n]; + if (curIndex >= mesh.mPositions.size()) { + throw DeadlyImportError("ASE: Invalid vertex index in face ", fi, "."); + } mPositions[iCurrent] = mesh.mPositions[(*i).mIndices[n]]; // add texture coordinates |