Author: pschweitzer
Date: Thu Nov 6 20:54:27 2014
New Revision: 65301
URL:
http://svn.reactos.org/svn/reactos?rev=65301&view=rev
Log:
[NTFS]
Add a sanity check in NtfsFindMftRecord()
Modified:
trunk/reactos/drivers/filesystems/ntfs/mft.c
Modified: trunk/reactos/drivers/filesystems/ntfs/mft.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/m…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/mft.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/mft.c [iso-8859-1] Thu Nov 6 20:54:27 2014
@@ -492,7 +492,6 @@
ULONGLONG *OutMFTIndex)
{
PFILE_RECORD_HEADER MftRecord;
- //ULONG Magic;
PNTFS_ATTR_CONTEXT IndexRootCtx;
PNTFS_ATTR_CONTEXT IndexBitmapCtx;
PNTFS_ATTR_CONTEXT IndexAllocationCtx;
@@ -520,7 +519,7 @@
if (NT_SUCCESS(ReadFileRecord(Vcb, MFTIndex, MftRecord)))
{
- //Magic = MftRecord->Magic;
+ ASSERT(MftRecord->Ntfs.Type == NRH_FILE_TYPE);
Status = FindAttribute(Vcb, MftRecord, AttributeIndexRoot, L"$I30", 4,
&IndexRootCtx);
if (!NT_SUCCESS(Status))