https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d375b7f6c5f6d78830670…
commit d375b7f6c5f6d78830670e88b7ea9063598d4354
Author: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com>
AuthorDate: Sun Dec 19 23:34:35 2021 +0100
Commit: GitHub <noreply(a)github.com>
CommitDate: Sun Dec 19 23:34:35 2021 +0100
[WIN32K:NTUSER] Make sure to hold User Global Lock before mapping desktop heap
(#4144)
Addendum to 8c098ee8d.
CORE-17890
---
win32ss/user/ntuser/desktop.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/win32ss/user/ntuser/desktop.c b/win32ss/user/ntuser/desktop.c
index 4d8f2956b44..43120cc7750 100644
--- a/win32ss/user/ntuser/desktop.c
+++ b/win32ss/user/ntuser/desktop.c
@@ -202,12 +202,16 @@ NTAPI
IntDesktopObjectOpen(
_In_ PVOID Parameters)
{
+ NTSTATUS Ret;
PWIN32_OPENMETHOD_PARAMETERS OpenParameters = Parameters;
PPROCESSINFO ppi = PsGetProcessWin32Process(OpenParameters->Process);
if (ppi == NULL)
return STATUS_SUCCESS;
- return IntMapDesktopView((PDESKTOP)OpenParameters->Object);
+ UserEnterExclusive();
+ Ret = IntMapDesktopView((PDESKTOP)OpenParameters->Object);
+ UserLeave();
+ return Ret;
}
NTSTATUS