mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[NTFS]
Return properly formatted stream names, according to: https://msdn.microsoft.com/en-us/library/cc232090.aspx svn path=/trunk/; revision=68809
This commit is contained in:
parent
6f4dfe4e09
commit
e9ae3cdf25
1 changed files with 4 additions and 2 deletions
|
@ -256,7 +256,7 @@ NtfsGetSteamInformation(PNTFS_FCB Fcb,
|
|||
{
|
||||
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 @@ NtfsGetSteamInformation(PNTFS_FCB Fcb,
|
|||
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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue