[llvm] r184824 - Don't assume ResultPath is null terminated.
Rafael Espindola
rafael.espindola at gmail.com
Mon Jun 24 21:23:46 PDT 2013
Author: rafael
Date: Mon Jun 24 23:23:46 2013
New Revision: 184824
URL: http://llvm.org/viewvc/llvm-project?rev=184824&view=rev
Log:
Don't assume ResultPath is null terminated.
Modified:
llvm/trunk/lib/Support/PathV2.cpp
Modified: llvm/trunk/lib/Support/PathV2.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/PathV2.cpp?rev=184824&r1=184823&r2=184824&view=diff
==============================================================================
--- llvm/trunk/lib/Support/PathV2.cpp (original)
+++ llvm/trunk/lib/Support/PathV2.cpp Mon Jun 24 23:23:46 2013
@@ -638,7 +638,8 @@ error_code unique_file(const Twine &Mode
if (close(FD))
return error_code(errno, system_category());
- return fs::remove(ResultPath.begin());
+ StringRef P(ResultPath.begin(), ResultPath.size());
+ return fs::remove(P);
}
error_code make_absolute(SmallVectorImpl<char> &path) {
More information about the llvm-commits
mailing list