Author: pschweitzer
Date: Sat Feb 14 15:41:44 2015
New Revision: 66265
URL:
http://svn.reactos.org/svn/reactos?rev=66265&view=rev
Log:
[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
Modified:
trunk/reactos/drivers/filesystems/ntfs/create.c
Modified: trunk/reactos/drivers/filesystems/ntfs/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/c…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/create.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/create.c [iso-8859-1] Sat Feb 14 15:41:44 2015
@@ -116,6 +116,11 @@
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;
@@ -131,6 +136,9 @@
}
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);