mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-08 21:24:34 +00:00
update assimp to 6.0.5
This commit is contained in:
parent
2d2eb57e2e
commit
f5cf21cfeb
941 changed files with 22718 additions and 12240 deletions
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -209,6 +209,8 @@ void MDLImporter::CreateTexture_3DGS_MDL4(const unsigned char *szData,
|
|||
return;
|
||||
}
|
||||
|
||||
static const uint32_t MaxTextureSize = 4096;
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Load color data of a texture and convert it to our output format
|
||||
void MDLImporter::ParseTextureColorData(const unsigned char *szData,
|
||||
|
|
@ -219,6 +221,11 @@ void MDLImporter::ParseTextureColorData(const unsigned char *szData,
|
|||
|
||||
// allocate storage for the texture image
|
||||
if (do_read) {
|
||||
// check for max texture sizes
|
||||
if (pcNew->mWidth > MaxTextureSize || pcNew->mHeight > MaxTextureSize) {
|
||||
throw DeadlyImportError("Invalid MDL file. A texture is too big.");
|
||||
}
|
||||
|
||||
if(pcNew->mWidth != 0 && pcNew->mHeight > UINT_MAX/pcNew->mWidth) {
|
||||
throw DeadlyImportError("Invalid MDL file. A texture is too big.");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue