[WIN32K:NTUSER]

- Fix range check in NtUserSetWindowFNID. Patch by Samuel Serapion.
- Update comment on an old hack
CORE-7212 #resolve

svn path=/trunk/; revision=67228
This commit is contained in:
Thomas Faber 2015-04-17 18:06:39 +00:00
parent d9c9bf096c
commit 87424486ea

View file

@ -3992,9 +3992,10 @@ NtUserSetWindowFNID(HWND hWnd,
// From user land we only set these. // From user land we only set these.
if (fnID != FNID_DESTROY) if (fnID != FNID_DESTROY)
{ // Hacked so we can mark desktop~! {
if ( (/*(fnID < FNID_BUTTON)*/ (fnID < FNID_FIRST) && (fnID > FNID_GHOST)) || /* HACK: The minimum should be FNID_BUTTON, but menu code relies on this */
Wnd->fnid != 0 ) if (fnID < FNID_FIRST || fnID > FNID_GHOST ||
Wnd->fnid != 0)
{ {
EngSetLastError(ERROR_INVALID_PARAMETER); EngSetLastError(ERROR_INVALID_PARAMETER);
RETURN( FALSE); RETURN( FALSE);