[FASTFAT]

Fix the most stupid bug ever in ReactOS history (at least!).

Dear Pierre, you pretend you're modifying the FileObject->FileName field, but, as you were told in the early when you learnt C, you're at that point in your code dealing with a local copy of the unicode string. So, if modifying the Buffer field is fine, because it's a pointer to memory zone, containing the wchar string, modifying the Length field is totally pointless because it won't magically modify the unicode string in the file object, and will just be forgotten as long the function will be unstacked.

So REALLY modify the file object. VfatSetRenameInformation receives less garbage information now...

svn path=/trunk/; revision=63049
This commit is contained in:
Pierre Schweitzer 2014-04-29 20:50:51 +00:00
parent 65113f23e7
commit 09a8dc268a

View file

@ -596,8 +596,8 @@ VfatCreateFile(
/* Update FO just to keep file name */
/* Skip first slash */
++idx;
PathNameU.Length = FileNameLen;
RtlMoveMemory(&PathNameU.Buffer[0], &PathNameU.Buffer[idx], PathNameU.Length);
FileObject->FileName.Length = FileNameLen;
RtlMoveMemory(&PathNameU.Buffer[0], &PathNameU.Buffer[idx], FileObject->FileName.Length);
}
else
{