mirror of
https://github.com/reactos/reactos.git
synced 2025-06-06 01:40:36 +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
1 changed files with 8 additions and 0 deletions
|
@ -116,6 +116,11 @@ NtfsMoonWalkID(PDEVICE_EXTENSION DeviceExt,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
ASSERT(MftRecord->Ntfs.Type == NRH_FILE_TYPE);
|
ASSERT(MftRecord->Ntfs.Type == NRH_FILE_TYPE);
|
||||||
|
if (!(MftRecord->Flags & FRH_IN_USE))
|
||||||
|
{
|
||||||
|
Status = STATUS_OBJECT_PATH_NOT_FOUND;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
FileName = GetBestFileNameFromRecord(MftRecord);
|
FileName = GetBestFileNameFromRecord(MftRecord);
|
||||||
WritePosition -= FileName->NameLength;
|
WritePosition -= FileName->NameLength;
|
||||||
|
@ -132,6 +137,9 @@ NtfsMoonWalkID(PDEVICE_EXTENSION DeviceExt,
|
||||||
|
|
||||||
ExFreePoolWithTag(MftRecord, TAG_NTFS);
|
ExFreePoolWithTag(MftRecord, TAG_NTFS);
|
||||||
|
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
return Status;
|
||||||
|
|
||||||
OutPath->Length = (MAX_PATH - WritePosition - 1) * sizeof(WCHAR);
|
OutPath->Length = (MAX_PATH - WritePosition - 1) * sizeof(WCHAR);
|
||||||
OutPath->MaximumLength = (MAX_PATH - WritePosition) * sizeof(WCHAR);
|
OutPath->MaximumLength = (MAX_PATH - WritePosition) * sizeof(WCHAR);
|
||||||
OutPath->Buffer = ExAllocatePoolWithTag(NonPagedPool, OutPath->MaximumLength, TAG_NTFS);
|
OutPath->Buffer = ExAllocatePoolWithTag(NonPagedPool, OutPath->MaximumLength, TAG_NTFS);
|
||||||
|
|
Loading…
Reference in a new issue