Author: tfaber Date: Fri Apr 17 18:06:39 2015 New Revision: 67228
URL: http://svn.reactos.org/svn/reactos?rev=67228&view=rev Log: [WIN32K:NTUSER] - Fix range check in NtUserSetWindowFNID. Patch by Samuel Serapion. - Update comment on an old hack CORE-7212 #resolve
Modified: trunk/reactos/win32ss/user/ntuser/window.c
Modified: trunk/reactos/win32ss/user/ntuser/window.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/window.... ============================================================================== --- trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] Fri Apr 17 18:06:39 2015 @@ -3992,9 +3992,10 @@
// From user land we only set these. if (fnID != FNID_DESTROY) - { // Hacked so we can mark desktop~! - if ( (/*(fnID < FNID_BUTTON)*/ (fnID < FNID_FIRST) && (fnID > FNID_GHOST)) || - Wnd->fnid != 0 ) + { + /* HACK: The minimum should be FNID_BUTTON, but menu code relies on this */ + if (fnID < FNID_FIRST || fnID > FNID_GHOST || + Wnd->fnid != 0) { EngSetLastError(ERROR_INVALID_PARAMETER); RETURN( FALSE);