https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c526f94b8c4709919f59b…
commit c526f94b8c4709919f59bb47a01e4ebb9f9627b6
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Fri Dec 28 11:27:28 2018 +0100
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Fri Dec 28 13:59:33 2018 +0100
[WIN32K:NTUSER] Acquire the user lock exclusively in NtUserGetSystemMenu. CORE-15512
---
win32ss/user/ntuser/menu.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/win32ss/user/ntuser/menu.c b/win32ss/user/ntuser/menu.c
index f2357fe538..6c825f3f10 100644
--- a/win32ss/user/ntuser/menu.c
+++ b/win32ss/user/ntuser/menu.c
@@ -274,6 +274,7 @@ BOOL IntDestroyMenu( PMENU pMenu, BOOL bRecurse)
{
PMENU SubMenu;
+ ASSERT(UserIsEnteredExclusive());
if (pMenu->rgItems) /* recursively destroy submenus */
{
int i;
@@ -319,6 +320,7 @@ UserDestroyMenuObject(PVOID Object)
BOOL FASTCALL
IntDestroyMenuObject(PMENU Menu, BOOL bRecurse)
{
+ ASSERT(UserIsEnteredExclusive());
if (Menu)
{
PWND Window;
@@ -5485,7 +5487,7 @@ NtUserGetSystemMenu(HWND hWnd, BOOL bRevert)
DECLARE_RETURN(HMENU);
TRACE("Enter NtUserGetSystemMenu\n");
- UserEnterShared();
+ UserEnterExclusive();
if (!(Window = UserGetWindowObject(hWnd)))
{