Merge pull request #4346 from assimp/kimkulling-fuzzer_ase_outofbounds_issue_4232
ASE: Fix material parsingpull/4344/head^2
commit
c142676908
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue