Fix out-of-bounds read in MDLImporter
Fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24502pull/4146/head
parent
932dfe0562
commit
1fe9d405f5
|
@ -600,7 +600,7 @@ void MDLImporter::InternReadFile_3DGS_MDL345() {
|
|||
|
||||
// need to read all textures
|
||||
for (unsigned int i = 0; i < (unsigned int)pcHeader->num_skins; ++i) {
|
||||
if (szCurrent >= szEnd) {
|
||||
if (szCurrent + sizeof(uint32_t) > szEnd) {
|
||||
throw DeadlyImportError("Texture data past end of file.");
|
||||
}
|
||||
BE_NCONST MDL::Skin *pcSkin;
|
||||
|
|
Loading…
Reference in New Issue