llvm.org GIT mirror llvm / 79f7028
llvm-undame: Fix an assert-on-invalid Found by oss-fuzz, fixes issue 12432 on os-fuzz. Differential Revision: https://reviews.llvm.org/D60206 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357648 91177308-0d34-0410-b5e6-96231b3b80d8 Nico Weber 1 year, 7 months ago
2 changed file(s) with 9 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
13881388 return nullptr;
13891389
13901390 if (Identifier->kind() == NodeKind::StructorIdentifier) {
1391 if (QN->Components->Count < 2) {
1392 Error = true;
1393 return nullptr;
1394 }
13911395 StructorIdentifierNode *SIN =
13921396 static_cast(Identifier);
1393 assert(QN->Components->Count >= 2);
13941397 Node *ClassNode = QN->Components->Nodes[QN->Components->Count - 2];
13951398 SIN->Class = static_cast(ClassNode);
13961399 }
1818 ; CHECK-EMPTY:
1919 ; CHECK-NEXT: ??
2020 ; CHECK-NEXT: error: Invalid mangled name
21
22 ??0@
23 ; CHECK-EMPTY:
24 ; CHECK-NEXT: ??0@
25 ; CHECK-NEXT: error: Invalid mangled name