[NTOS:Mm] Fix some 64 bit issues

This commit is contained in:
Timo Kreuzer 2023-04-14 10:34:21 +03:00
parent 69daff72d2
commit 539c316589
2 changed files with 3 additions and 3 deletions

View file

@ -598,7 +598,7 @@ MmCreatePageFileMapping(PEPROCESS Process,
/* And we don't support creating for other process */
ASSERT(Process == PsGetCurrentProcess());
if (SwapEntry & (1 << 31))
if (SwapEntry & (1 << (sizeof(SWAPENTRY) - 1)))
{
KeBugCheck(MEMORY_MANAGEMENT);
}

View file

@ -152,7 +152,7 @@ MmWriteToSwapPage(SWAPENTRY SwapEntry, PFN_NUMBER Page)
IO_STATUS_BLOCK Iosb;
NTSTATUS Status;
KEVENT Event;
UCHAR MdlBase[sizeof(MDL) + sizeof(ULONG)];
UCHAR MdlBase[sizeof(MDL) + sizeof(PFN_NUMBER)];
PMDL Mdl = (PMDL)MdlBase;
DPRINT("MmWriteToSwapPage\n");
@ -217,7 +217,7 @@ MiReadPageFile(
IO_STATUS_BLOCK Iosb;
NTSTATUS Status;
KEVENT Event;
UCHAR MdlBase[sizeof(MDL) + sizeof(ULONG)];
UCHAR MdlBase[sizeof(MDL) + sizeof(PFN_NUMBER)];
PMDL Mdl = (PMDL)MdlBase;
PMMPAGING_FILE PagingFile;