浏览代码

Merge pull request #4049 from assimp/kimkulling-patch-fuzzer_Issue_25058

Handle  empty keys
Kim Kulling 4 年之前
父节点
当前提交
e5bf7f7e07
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      code/AssetLib/FBX/FBXParser.cpp

+ 4 - 0
code/AssetLib/FBX/FBXParser.cpp

@@ -192,6 +192,10 @@ Scope::Scope(Parser& parser,bool topLevel)
         }
 
         const std::string& str = n->StringContents();
+        if (str.empty()) {
+            ParseError("unexpected content: empty string.");
+        }
+        
         elements.insert(ElementMap::value_type(str,new_Element(*n,parser)));
 
         // Element() should stop at the next Key token (or right after a Close token)