[NTOS:MM] Fix ViewSize parameter passed to MiInsertVadEx() from MiCreatePebOrTeb()

The size is in bytes, not in pages! On x86 we got away with it, since PEB and TEB require only a single page and the 1 passed to MiInsertVadEx() was aligned up to PAGE_SIZE. On x64 this doesn't work, since the size is 2 pages.
This commit is contained in:
Timo Kreuzer 2018-01-29 12:37:26 +01:00
parent e8f8536f9b
commit e49ef251b7

View file

@ -88,7 +88,7 @@ MiCreatePebOrTeb(IN PEPROCESS Process,
*BaseAddress = 0;
Status = MiInsertVadEx((PMMVAD)Vad,
BaseAddress,
BYTES_TO_PAGES(Size),
Size,
HighestAddress,
PAGE_SIZE,
MEM_TOP_DOWN);