Author: pschweitzer
Date: Mon Aug 24 08:43:26 2015
New Revision: 68809
URL:
http://svn.reactos.org/svn/reactos?rev=68809&view=rev
Log:
[NTFS]
Return properly formatted stream names, according to:
https://msdn.microsoft.com/en-us/library/cc232090.aspx
Modified:
trunk/reactos/drivers/filesystems/ntfs/finfo.c
Modified: trunk/reactos/drivers/filesystems/ntfs/finfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/finfo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/finfo.c [iso-8859-1] Mon Aug 24 08:43:26 2015
@@ -256,7 +256,7 @@
{
if (Attribute->Type == AttributeData)
{
- CurrentSize = FIELD_OFFSET(FILE_STREAM_INFORMATION, StreamName) +
Attribute->NameLength * sizeof(WCHAR);
+ CurrentSize = FIELD_OFFSET(FILE_STREAM_INFORMATION, StreamName) +
Attribute->NameLength * sizeof(WCHAR) + wcslen(L"::$DATA") * sizeof(WCHAR);
if (CurrentSize > *BufferLength)
{
@@ -268,7 +268,9 @@
CurrentInfo->StreamNameLength = Attribute->NameLength * sizeof(WCHAR);
CurrentInfo->StreamSize.QuadPart = AttributeDataLength(Attribute);
CurrentInfo->StreamAllocationSize.QuadPart =
AttributeAllocatedLength(Attribute);
- RtlMoveMemory(CurrentInfo->StreamName, (PWCHAR)((ULONG_PTR)Attribute +
Attribute->NameOffset), CurrentInfo->StreamNameLength);
+ CurrentInfo->StreamName[0] = L':';
+ RtlMoveMemory(&CurrentInfo->StreamName[1],
(PWCHAR)((ULONG_PTR)Attribute + Attribute->NameOffset),
CurrentInfo->StreamNameLength);
+ RtlMoveMemory(&CurrentInfo->StreamName[Attribute->NameLength + 1],
L":$DATA", sizeof(L":$DATA") - sizeof(UNICODE_NULL));
if (Previous != NULL)
{