Fixx out-of-range access in ASE-Parser

- closes https://github.com/assimp/assimp/issues/4495
pull/4502/head
Kim Kulling 2022-04-27 19:52:23 +02:00 committed by GitHub
parent 458a0314aa
commit 37ec378b60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -646,7 +646,9 @@ void Parser::ParseLV2MaterialBlock(ASE::Material &mat) {
} }
// get a reference to the material // get a reference to the material
if (iIndex < mat.avSubMaterials.size()) {
Material &sMat = mat.avSubMaterials[iIndex]; Material &sMat = mat.avSubMaterials[iIndex];
}
// parse the material block // parse the material block
ParseLV2MaterialBlock(sMat); ParseLV2MaterialBlock(sMat);