From 5f0ebedf290fe3e4c7d5f6405de61686f92fd190 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Tue, 21 Apr 2015 04:45:09 +0000 Subject: [PATCH] [Win32k] - 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/win32ss/user/ntuser/winpos.c b/reactos/win32ss/user/ntuser/winpos.c index 0cfbd291f01..7a472533d67 100644 --- a/reactos/win32ss/user/ntuser/winpos.c +++ b/reactos/win32ss/user/ntuser/winpos.c @@ -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, -- 2.17.1