Merge pull request #4049 from assimp/kimkulling-patch-fuzzer_Issue_25058
Handle empty keyspull/4050/head
commit
e5bf7f7e07
|
@ -192,6 +192,10 @@ Scope::Scope(Parser& parser,bool topLevel)
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& str = n->StringContents();
|
const std::string& str = n->StringContents();
|
||||||
|
if (str.empty()) {
|
||||||
|
ParseError("unexpected content: empty string.");
|
||||||
|
}
|
||||||
|
|
||||||
elements.insert(ElementMap::value_type(str,new_Element(*n,parser)));
|
elements.insert(ElementMap::value_type(str,new_Element(*n,parser)));
|
||||||
|
|
||||||
// Element() should stop at the next Key token (or right after a Close token)
|
// Element() should stop at the next Key token (or right after a Close token)
|
||||||
|
|
Loading…
Reference in New Issue