Author: mbosma
Date: Thu Jul 27 15:24:36 2006
New Revision: 23316
URL:
http://svn.reactos.org/svn/reactos?rev=23316&view=rev
Log:
Merge 23302
Modified:
branches/cache_manager_rewrite/vfat/finfo.c
Modified: branches/cache_manager_rewrite/vfat/finfo.c
URL:
http://svn.reactos.org/svn/reactos/branches/cache_manager_rewrite/vfat/finf…
==============================================================================
--- branches/cache_manager_rewrite/vfat/finfo.c (original)
+++ branches/cache_manager_rewrite/vfat/finfo.c Thu Jul 27 15:24:36 2006
@@ -341,14 +341,13 @@
ASSERT(NameInfo != NULL);
ASSERT(FCB != NULL);
- if (*BufferLength < sizeof(FILE_NAME_INFORMATION) + FCB->PathNameU.Length +
sizeof(WCHAR))
+ NameInfo->FileNameLength = FCB->PathNameU.Length;
+ if (*BufferLength < FIELD_OFFSET(FILE_NAME_INFORMATION, FileName[0]) +
FCB->PathNameU.Length)
return STATUS_BUFFER_OVERFLOW;
- NameInfo->FileNameLength = FCB->PathNameU.Length;
RtlCopyMemory(NameInfo->FileName, FCB->PathNameU.Buffer,
FCB->PathNameU.Length);
- NameInfo->FileName[FCB->PathNameU.Length / sizeof(WCHAR)] = 0;
-
- *BufferLength -= (sizeof(FILE_NAME_INFORMATION) + FCB->PathNameU.Length +
sizeof(WCHAR));
+
+ *BufferLength -= (FIELD_OFFSET(FILE_NAME_INFORMATION, FileName[0]) +
FCB->PathNameU.Length);
return STATUS_SUCCESS;
}