[NTOS:MM] MiMapViewOfDataSection(): ASSERT InheritDisposition value

This commit is contained in:
Serge Gautherie
2026-06-15 12:34:56 +00:00
committed by Timo Kreuzer
parent 29ca914bd4
commit 5df7d05049
+9 -2
View File
@@ -1177,6 +1177,9 @@ MiMapViewOfDataSection(
DPRINT("Mapping ARM3 data section\n");
/* Check for invalid inherit disposition */
ASSERT((InheritDisposition >= ViewShare) && (InheritDisposition <= ViewUnmap));
/* Get the segment for this section */
Segment = ControlArea->Segment;
@@ -2553,8 +2556,12 @@ MmMapViewOfArm3Section(
ULONG ProtectionMask;
NTSTATUS Status;
ULONG64 CalculatedViewSize;
PAGED_CODE();
/* Check for invalid inherit disposition */
// Let MiMapViewOfDataSection() check InheritDisposition value.
/* Get the segment and control area */
Section = (PSECTION)SectionObject;
ControlArea = Section->Segment->ControlArea;
@@ -3291,9 +3298,9 @@ NtMapViewOfSection(
#endif
/* Check for invalid inherit disposition */
if ((InheritDisposition > ViewUnmap) || (InheritDisposition < ViewShare))
if ((InheritDisposition < ViewShare) || (InheritDisposition > ViewUnmap))
{
DPRINT1("Invalid inherit disposition\n");
DPRINT1("Invalid inherit disposition: %d\n", InheritDisposition);
return STATUS_INVALID_PARAMETER_8;
}