[llvm] r359002 - Revert "[dsymutil] Fix use-after-free when sys::path::append grows the buffer."
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 23 08:44:20 PDT 2019
Author: adrian
Date: Tue Apr 23 08:44:19 2019
New Revision: 359002
URL: http://llvm.org/viewvc/llvm-project?rev=359002&view=rev
Log:
Revert "[dsymutil] Fix use-after-free when sys::path::append grows the buffer."
Modified:
llvm/trunk/tools/dsymutil/dsymutil.cpp
Modified: llvm/trunk/tools/dsymutil/dsymutil.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/dsymutil/dsymutil.cpp?rev=359002&r1=359001&r2=359002&view=diff
==============================================================================
--- llvm/trunk/tools/dsymutil/dsymutil.cpp (original)
+++ llvm/trunk/tools/dsymutil/dsymutil.cpp Tue Apr 23 08:44:19 2019
@@ -328,7 +328,7 @@ static Expected<OutputLocation> getOutpu
return std::move(E);
llvm::sys::path::append(Path, "Contents", "Resources");
- std::string ResourceDir = Path;
+ StringRef ResourceDir = Path;
llvm::sys::path::append(Path, "DWARF", llvm::sys::path::filename(DwarfFile));
return OutputLocation(Path.str(), ResourceDir.str());
}
More information about the llvm-commits
mailing list