Merge pull request #4346 from assimp/kimkulling-fuzzer_ase_outofbounds_issue_4232

ASE: Fix material parsing
pull/4344/head^2
Kim Kulling 2022-01-20 10:40:00 +01:00 committed by GitHub
commit c142676908
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -486,8 +486,9 @@ void Parser::ParseLV1MaterialListBlock() {
ParseLV4MeshLong(iIndex); ParseLV4MeshLong(iIndex);
if (iIndex >= iMaterialCount) { if (iIndex >= iMaterialCount) {
LogWarning("Out of range: material index is too large"); LogError("Out of range: material index is too large");
iIndex = iMaterialCount - 1; iIndex = iMaterialCount - 1;
return;
} }
// get a reference to the material // get a reference to the material