Skip to content

Commit 10affaf

Browse files
authored
[AArch64][AsmParser] Stop parsing on error (llvm#106804)
Fixes buffer overflow after llvm#106625
1 parent 8f0c014 commit 10affaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -6995,7 +6995,7 @@ bool AArch64AsmParser::parseDirectiveArch(SMLoc L) {
69956995
});
69966996

69976997
if (It == std::end(ExtensionMap))
6998-
Error(CurLoc, "unsupported architectural extension: " + Name);
6998+
return Error(CurLoc, "unsupported architectural extension: " + Name);
69996999

70007000
if (EnableFeature)
70017001
STI.SetFeatureBitsTransitively(It->Features);

0 commit comments

Comments
 (0)