* Sync up to trunk head (r65491).
[reactos.git] / drivers / filesystems / ntfs / mft.c
index acecf2d..9b658c6 100644 (file)
@@ -558,7 +558,7 @@ NtfsFindMftRecord(PDEVICE_EXTENSION Vcb,
         IndexRoot = (PINDEX_ROOT_ATTRIBUTE)IndexRecord;
         IndexEntry = (PINDEX_ENTRY_ATTRIBUTE)((PCHAR)&IndexRoot->Header + IndexRoot->Header.FirstEntryOffset);
         /* Index root is always resident. */
-        IndexEntryEnd = (PINDEX_ENTRY_ATTRIBUTE)(IndexRecord + IndexRootCtx->Record.Resident.ValueLength);
+        IndexEntryEnd = (PINDEX_ENTRY_ATTRIBUTE)(IndexRecord + IndexRoot->Header.TotalSizeOfEntries);
         ReleaseAttributeContext(IndexRootCtx);
 
         DPRINT("IndexRecordSize: %x IndexBlockSize: %x\n", Vcb->NtfsInfo.BytesPerIndexRecord, IndexRoot->SizeOfEntry);