mirror of
https://github.com/reactos/reactos.git
synced 2024-10-04 16:36:11 +00:00
[NTFS]
NtfsMoonWalkID(): - Do not allow opening a file by ID if it's not in use any longer - Do not attempt to create the full path, if an error occured during walk svn path=/trunk/; revision=66265
This commit is contained in:
parent
483c6f32a5
commit
4490614032
|
@ -116,6 +116,11 @@ NtfsMoonWalkID(PDEVICE_EXTENSION DeviceExt,
|
|||
break;
|
||||
|
||||
ASSERT(MftRecord->Ntfs.Type == NRH_FILE_TYPE);
|
||||
if (!(MftRecord->Flags & FRH_IN_USE))
|
||||
{
|
||||
Status = STATUS_OBJECT_PATH_NOT_FOUND;
|
||||
break;
|
||||
}
|
||||
|
||||
FileName = GetBestFileNameFromRecord(MftRecord);
|
||||
WritePosition -= FileName->NameLength;
|
||||
|
@ -132,6 +137,9 @@ NtfsMoonWalkID(PDEVICE_EXTENSION DeviceExt,
|
|||
|
||||
ExFreePoolWithTag(MftRecord, TAG_NTFS);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
return Status;
|
||||
|
||||
OutPath->Length = (MAX_PATH - WritePosition - 1) * sizeof(WCHAR);
|
||||
OutPath->MaximumLength = (MAX_PATH - WritePosition) * sizeof(WCHAR);
|
||||
OutPath->Buffer = ExAllocatePoolWithTag(NonPagedPool, OutPath->MaximumLength, TAG_NTFS);
|
||||
|
|
Loading…
Reference in a new issue