[PATCH] D55624: Windows rename_internal function incorrectly passing character count instead of byte count to SetFileInformationByHandle.
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 12 16:11:48 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL348995: [Support] Fix FileNameLength passed to SetFileInformationByHandle (authored by smeenai, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D55624?vs=177964&id=177969#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55624/new/
https://reviews.llvm.org/D55624
Files:
llvm/trunk/lib/Support/Windows/Path.inc
Index: llvm/trunk/lib/Support/Windows/Path.inc
===================================================================
--- llvm/trunk/lib/Support/Windows/Path.inc
+++ llvm/trunk/lib/Support/Windows/Path.inc
@@ -416,7 +416,7 @@
*reinterpret_cast<FILE_RENAME_INFO *>(RenameInfoBuf.data());
RenameInfo.ReplaceIfExists = ReplaceIfExists;
RenameInfo.RootDirectory = 0;
- RenameInfo.FileNameLength = ToWide.size();
+ RenameInfo.FileNameLength = ToWide.size() * sizeof(wchar_t);
std::copy(ToWide.begin(), ToWide.end(), &RenameInfo.FileName[0]);
SetLastError(ERROR_SUCCESS);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55624.177969.patch
Type: text/x-patch
Size: 586 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181213/5df69d9c/attachment-0001.bin>
More information about the llvm-commits
mailing list