- Fix class window procedure checks, prevents misbehaving applications from calling wrong class procs.

svn path=/trunk/; revision=54250
This commit is contained in:
James Tabor
2011-10-24 14:49:25 +00:00
parent 519e75748d
commit da83a8919e
+18 -2
View File
@@ -1801,7 +1801,15 @@ LRESULT WINAPI PopupMenuWndProcA(HWND Wnd, UINT Message, WPARAM wParam, LPARAM l
{
NtUserSetWindowFNID(Wnd, FNID_MENU);
}
}
else
{
if (pWnd->fnid != FNID_MENU)
{
ERR("Wrong window class for Menu!\n");
return 0;
}
}
}
#endif
TRACE("YES! hwnd=%x msg=0x%04x wp=0x%04lx lp=0x%08lx\n", Wnd, Message, wParam, lParam);
@@ -1890,7 +1898,15 @@ PopupMenuWndProcW(HWND Wnd, UINT Message, WPARAM wParam, LPARAM lParam)
{
NtUserSetWindowFNID(Wnd, FNID_MENU);
}
}
else
{
if (pWnd->fnid != FNID_MENU)
{
ERR("Wrong window class for Menu!\n");
return 0;
}
}
}
#endif
TRACE("hwnd=%x msg=0x%04x wp=0x%04lx lp=0x%08lx\n", Wnd, Message, wParam, lParam);