https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9666f00572e532a13737f…
commit 9666f00572e532a13737fdf47c816103d0f40e63
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sun Apr 2 00:11:37 2023 +0300
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Sat Sep 9 12:15:24 2023 +0300
[WIN32K][NTOS] Fix parameter to MmMapViewOfSection
The code was passing 0 instead of SECTION_INHERIT::ViewUnmap (2). 0 isn't even a
proper constant to be used here. It worked, because MmMapViewOfSection only compares
against ViewShare (1) and treats everything else as ViewUnmap.
---
ntoskrnl/mm/ARM3/procsup.c | 2 +-
win32ss/gdi/eng/mapping.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ntoskrnl/mm/ARM3/procsup.c b/ntoskrnl/mm/ARM3/procsup.c
index c1c28af18c6..da94b64b7ec 100644
--- a/ntoskrnl/mm/ARM3/procsup.c
+++ b/ntoskrnl/mm/ARM3/procsup.c
@@ -1110,7 +1110,7 @@ MmInitializeProcessAddressSpace(IN PEPROCESS Process,
0,
NULL,
&ViewSize,
- 0,
+ ViewUnmap,
MEM_COMMIT,
PAGE_READWRITE);
diff --git a/win32ss/gdi/eng/mapping.c b/win32ss/gdi/eng/mapping.c
index 0ca9de2dd9a..76b21054215 100644
--- a/win32ss/gdi/eng/mapping.c
+++ b/win32ss/gdi/eng/mapping.c
@@ -207,7 +207,7 @@ EngMapSection(
pSection->cjViewSize,
NULL,
&pSection->cjViewSize,
- 0,
+ ViewUnmap,
0,
PAGE_READWRITE);
if (!NT_SUCCESS(Status))