Details
-
Bug
-
Resolution: Fixed
-
Major
Description
shell32_winetest:shlfolder does something like:
MoveFile("C:\\Documents and Settings\\Administrator\\My Documents\\winetest\\winetest", "C:\\winetest"); |
When VfatSetRenameInformation prepares the NewName for this case, it goes through this code path (line 653):
else if (TargetFileObject != NULL) |
{
|
/* Here, copy first path name and then append filename */ |
RtlCopyUnicodeString(&NewName, &((PVFATFCB)TargetFileObject->FsContext)->PathNameU);
|
NewName.Buffer[NewName.Length / sizeof(WCHAR)] = L'\\'; |
NewName.Length += sizeof(WCHAR); |
RtlAppendUnicodeStringToString(&NewName, &RenameInfoString);
|
}
|
Because TargetFileObject refers to the root directory, for which PathNameU is L"\\", this ends up creating "\\\\winetest" with two leading backslashes as the file name, which gets rejected as invalid.
cc heis spiter