Merge pull request #4836 from sashashura/patch-8

Fixes Heap-buffer-overflow READ 4 in Assimp::ScenePreprocessor::ProcssMesh
pull/4837/head
Kim Kulling 2022-12-15 14:04:19 +01:00 committed by GitHub
commit ee02c389ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -292,6 +292,7 @@ void OFFImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOS
if(!idx || idx > 9) { if(!idx || idx > 9) {
ASSIMP_LOG_ERROR("OFF: Faces with zero indices aren't allowed"); ASSIMP_LOG_ERROR("OFF: Faces with zero indices aren't allowed");
--mesh->mNumFaces; --mesh->mNumFaces;
++i;
continue; continue;
} }
faces->mNumIndices = idx; faces->mNumIndices = idx;