diff --git a/reactos/ntoskrnl/mm/ARM3/section.c b/reactos/ntoskrnl/mm/ARM3/section.c index a51bdabba70..12fd3fdfb0a 100644 --- a/reactos/ntoskrnl/mm/ARM3/section.c +++ b/reactos/ntoskrnl/mm/ARM3/section.c @@ -1440,6 +1440,10 @@ NtCreateSection(OUT PHANDLE SectionHandle, } else if (!MaximumSize) MaximumSize = &SafeMaximumSize; + /* Check that MaximumSize is valid if backed by paging file */ + if ((!FileHandle) && (!MaximumSize->QuadPart)) + return STATUS_INVALID_PARAMETER_4; + /* Create the section */ Status = MmCreateSection(&SectionObject, DesiredAccess,