Fix a use after free on invalid input.
llvm-svn: 193737
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