mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Fix a use after free on invalid input.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193737 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -623,11 +623,7 @@ bool BitcodeReader::ParseAttrKind(uint64_t Code, Attribute::AttrKind *Kind) {
|
||||
*Kind = Attribute::ZExt;
|
||||
return false;
|
||||
default:
|
||||
std::string Buf;
|
||||
raw_string_ostream fmt(Buf);
|
||||
fmt << "Unknown attribute kind (" << Code << ")";
|
||||
fmt.flush();
|
||||
return Error(Buf.c_str());
|
||||
return Error("Unknown attribute kind");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user