Fix stack-overflow in MDLLoader

- Use correct len to copy filename.
- Closes https://github.com/assimp/assimp/issues/4447
pull/4448/head
Kim Kulling 2022-03-16 13:59:21 +01:00 committed by GitHub
parent a828114a1d
commit c2b05acaa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -493,7 +493,7 @@ void MDLImporter::ParseSkinLump_3DGS_MDL7(
size_t iLen2 = iLen + 1;
iLen2 = iLen2 > MAXLEN ? MAXLEN : iLen2;
memcpy(szFile.data, (const char *)szCurrent, iLen2);
szFile.length = (ai_uint32)iLen;
szFile.length = static_cast<ai_uint32>(iLen2);
szCurrent += iLen2;