[Win32k]
authorJames Tabor <james.tabor@reactos.org>
Tue, 21 Apr 2015 04:45:09 +0000 (04:45 +0000)
committerJames Tabor <james.tabor@reactos.org>
Tue, 21 Apr 2015 04:45:09 +0000 (04:45 +0000)
- Passing GetDesktopWindow() to GetWindowPlacement() causes NULL pointer dereference, Bug found by Nathan Osman, Fix CORE-9578.

svn path=/trunk/; revision=67329

reactos/win32ss/user/ntuser/winpos.c

index 0cfbd29..7a47253 100644 (file)
@@ -397,7 +397,7 @@ WinPosInitInternalPos(PWND Wnd, RECTL *RestoreRect)
    POINT Size;
    RECTL Rect = *RestoreRect;
 
-   if (Wnd->spwndParent != UserGetDesktopWindow())
+   if (Wnd->spwndParent && Wnd->spwndParent != UserGetDesktopWindow())
    {
       RECTL_vOffsetRect(&Rect,
                         -Wnd->spwndParent->rcClient.left,