mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[NTOS:MM] Properly handle the 1-offset of paging files
This commit is contained in:
parent
a46ee7dafe
commit
857dd4ae36
1 changed files with 4 additions and 1 deletions
|
@ -189,7 +189,7 @@ NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
MmReadFromSwapPage(SWAPENTRY SwapEntry, PFN_NUMBER Page)
|
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
|
NTSTATUS
|
||||||
|
@ -215,6 +215,9 @@ MiReadPageFile(
|
||||||
return(STATUS_UNSUCCESSFUL);
|
return(STATUS_UNSUCCESSFUL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Normalize offset. */
|
||||||
|
PageFileOffset--;
|
||||||
|
|
||||||
ASSERT(PageFileIndex < MAX_PAGING_FILES);
|
ASSERT(PageFileIndex < MAX_PAGING_FILES);
|
||||||
|
|
||||||
PagingFile = MmPagingFile[PageFileIndex];
|
PagingFile = MmPagingFile[PageFileIndex];
|
||||||
|
|
Loading…
Reference in a new issue