diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index 36ff4efc0c1..cf3bac71aee 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -4690,6 +4690,8 @@ MmMapViewOfSection(IN PVOID SectionObject, (*ViewSize) = Section->MaximumSize.u.LowPart - ViewOffset; } + *ViewSize = PAGE_ROUND_UP(*ViewSize); + MmLockSectionSegment(Section->Segment); Status = MmMapViewOfSegment(AddressSpace, Section,