forked from OSchip/llvm-project
llvm-undname: Fix an assert-on-invalid, found by oss-fuzz
llvm-svn: 358891
This commit is contained in:
parent
70346d127b
commit
f5c7f3ad33
|
@ -1040,7 +1040,7 @@ wchar_t Demangler::demangleWcharLiteral(StringView &MangledName) {
|
|||
uint8_t C1, C2;
|
||||
|
||||
C1 = demangleCharLiteral(MangledName);
|
||||
if (Error)
|
||||
if (Error || MangledName.empty())
|
||||
goto WCharLiteralError;
|
||||
C2 = demangleCharLiteral(MangledName);
|
||||
if (Error)
|
||||
|
|
|
@ -164,3 +164,8 @@
|
|||
; CHECK-EMPTY:
|
||||
; CHECK-NEXT: ??_C@_0601234567@abcdefghijklmnopqrtsuvwxyzABCDEFGHIJKLMNOPQRTSUVWXYZabcdefghijklmnopqrtsuvwxyzABCDEFGHIJKLMNOPQRTSUVWXYZabcdefghijklmnopqrtsuvwxyz
|
||||
; CHECK-NEXT: error: Invalid mangled name
|
||||
|
||||
??_C@_12@?z
|
||||
; CHECK-EMPTY:
|
||||
; CHECK-NEXT: ??_C@_12@?z
|
||||
; CHECK-NEXT: error: Invalid mangled name
|
||||
|
|
Loading…
Reference in New Issue