From 604d4c9de87bd720785c0faea110cd0447db2b65 Mon Sep 17 00:00:00 2001 From: Michael Martin Date: Tue, 21 Dec 2010 15:19:58 +0000 Subject: [PATCH] [NTOS]: Check that MaximumSize is valid value if the section is being backed by paging file. svn path=/trunk/; revision=50081 --- reactos/ntoskrnl/mm/ARM3/section.c | 4 ++++ 1 file changed, 4 insertions(+) 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,