Переглянути джерело

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);
 
                 if (iIndex >= iMaterialCount) {
-                    LogWarning("Out of range: material index is too large");
+                    LogError("Out of range: material index is too large");
                     iIndex = iMaterialCount - 1;
+                    return;
                 }
 
                 // get a reference to the material