Author: jimtabor
Date: Mon Oct 24 14:49:25 2011
New Revision: 54250

URL: http://svn.reactos.org/svn/reactos?rev=54250&view=rev
Log:
[User32]
- Fix class window procedure checks, prevents misbehaving applications from 
calling wrong class procs.

Modified:
    trunk/reactos/dll/win32/user32/windows/menu.c

Modified: trunk/reactos/dll/win32/user32/windows/menu.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/menu.c?rev=54250&r1=54249&r2=54250&view=diff
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/menu.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/menu.c [iso-8859-1] Mon Oct 24 
14:49:25 2011
@@ -1801,7 +1801,15 @@
      {
         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 @@
      {
         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);


Reply via email to