From 26b43cac184d7311bd8552029e13f756fdc7c253 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 31 Oct 2013 04:20:23 +0000 Subject: Fix a use after free on invalid input. llvm-svn: 193737 --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp') diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index e408cd1..1661990 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -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"); } } -- cgit v1.1