mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 16:31:07 +08:00
[NTOS:MM] Properly handle the 1-offset of paging files
This commit is contained in:
@@ -189,7 +189,7 @@ NTSTATUS
|
||||
NTAPI
|
||||
MmReadFromSwapPage(SWAPENTRY SwapEntry, PFN_NUMBER Page)
|
||||
{
|
||||
return MiReadPageFile(Page, FILE_FROM_ENTRY(SwapEntry), OFFSET_FROM_ENTRY(SwapEntry) - 1);
|
||||
return MiReadPageFile(Page, FILE_FROM_ENTRY(SwapEntry), OFFSET_FROM_ENTRY(SwapEntry));
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
@@ -215,6 +215,9 @@ MiReadPageFile(
|
||||
return(STATUS_UNSUCCESSFUL);
|
||||
}
|
||||
|
||||
/* Normalize offset. */
|
||||
PageFileOffset--;
|
||||
|
||||
ASSERT(PageFileIndex < MAX_PAGING_FILES);
|
||||
|
||||
PagingFile = MmPagingFile[PageFileIndex];
|
||||
|
||||
Reference in New Issue
Block a user