llvm-undname: Fix another crash-on-invalid found by oss-fuzz

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358363 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nico Weber
2019-04-14 23:08:12 +00:00
parent 31fb1782bc
commit eaedc0223b
2 changed files with 9 additions and 1 deletions
+4 -1
View File
@@ -654,7 +654,10 @@ Demangler::translateIntrinsicFunctionCode(char CH,
IdentifierNode *
Demangler::demangleFunctionIdentifierCode(StringView &MangledName,
FunctionIdentifierCodeGroup Group) {
assert(!MangledName.empty());
if (MangledName.empty()) {
Error = true;
return nullptr;
}
switch (Group) {
case FunctionIdentifierCodeGroup::Basic:
switch (char CH = MangledName.popFront()) {