소스 검색

Merge pull request #4346 from assimp/kimkulling-fuzzer_ase_outofbounds_issue_4232

ASE: Fix material parsing
Kim Kulling 3 년 전
부모
커밋
c142676908
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      code/AssetLib/ASE/ASEParser.cpp

+ 2 - 1
code/AssetLib/ASE/ASEParser.cpp

@@ -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