Author: gadamopoulos
Date: Mon Oct 26 12:09:34 2015
New Revision: 69709
URL:
http://svn.reactos.org/svn/reactos?rev=69709&view=rev
Log:
[WIN32K]
- co_UserCreateWindowEx: Fail when a wrong handle was passed for the parent window.
"Fixes" a crash down the road due to missing null checks in other places (null
checks are needed because desktop windows don't have parents).
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] Mon Oct 26 12:09:34 2015
@@ -1947,6 +1947,12 @@
ParentWindow = hWndParent ? UserGetWindowObject(hWndParent): NULL;
OwnerWindow = hWndOwner ? UserGetWindowObject(hWndOwner): NULL;
+ if (hWndParent && !ParentWindow)
+ {
+ ERR("Got invalid parent window handle\n");
+ goto cleanup;
+ }
+
/* FIXME: Is this correct? */
if(OwnerWindow)
OwnerWindow = UserGetAncestor(OwnerWindow, GA_ROOT);