[NTOS]: Check that MaximumSize is valid value if the section is being backed by paging file.

svn path=/trunk/; revision=50081
This commit is contained in:
Michael Martin 2010-12-21 15:19:58 +00:00
parent 2b69f5fa2c
commit 604d4c9de8

View file

@ -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,