Author: pschweitzer
Date: Tue Apr 29 20:50:51 2014
New Revision: 63049
URL:
http://svn.reactos.org/svn/reactos?rev=63049&view=rev
Log:
[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...
Modified:
trunk/reactos/drivers/filesystems/fastfat/create.c
Modified: trunk/reactos/drivers/filesystems/fastfat/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/create.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/create.c [iso-8859-1] Tue Apr 29 20:50:51
2014
@@ -596,8 +596,8 @@
/* 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
{