[WIN32K:NTUSER] Acquire the user lock exclusively in NtUserGetSystemMenu. CORE-15512

This commit is contained in:
Thomas Faber 2018-12-28 11:27:28 +01:00
parent 0013b0f71c
commit c526f94b8c
No known key found for this signature in database
GPG key ID: 076E7C3D44720826

View file

@ -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)))
{