Author: pschweitzer Date: Tue Nov 25 21:03:17 2014 New Revision: 65486
URL: http://svn.reactos.org/svn/reactos?rev=65486&view=rev Log: [NTFS] Make the bound check more consistent and more accurate
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/mf... ============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/mft.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/mft.c [iso-8859-1] Tue Nov 25 21:03:17 2014 @@ -558,7 +558,7 @@ 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);