llvm.org GIT mirror llvm / de608b0
Fix string UAF in new FileCheck test git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359493 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Kleckner 1 year, 7 months ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
9797
9898 public:
9999 bool parseExpect(std::string &VarName, std::string &Trailer) {
100 StringRef NameTrailer = StringRef(VarName + Trailer);
100 std::string NameTrailer = VarName + Trailer;
101101 std::unique_ptr Buffer =
102102 MemoryBuffer::getMemBufferCopy(NameTrailer, "TestBuffer");
103103 StringRef NameTrailerRef = Buffer->getBuffer();