Fix UNKNOWN READ in Assimp::MDLImporter::ParseSkinLump_3DGS_MDL7
parent
4180b1fd08
commit
54b0c00418
|
@ -481,6 +481,10 @@ void MDLImporter::ParseSkinLump_3DGS_MDL7(
|
|||
pcNew->achFormatHint[2] = 's';
|
||||
pcNew->achFormatHint[3] = '\0';
|
||||
|
||||
if (szCurrent + pcNew->mWidth > this->mBuffer + this->iFileSize) {
|
||||
throw DeadlyImportError("Invalid MDL file. Unexpected EOF");
|
||||
}
|
||||
|
||||
pcNew->pcData = (aiTexel *)new unsigned char[pcNew->mWidth];
|
||||
memcpy(pcNew->pcData, szCurrent, pcNew->mWidth);
|
||||
szCurrent += iWidth;
|
||||
|
|
Loading…
Reference in New Issue