[PATCH 5/5] user32: Initialize length before calling GetWindowPlacement().
Huw Davies <[email protected]>
| Newsgroups | gmane.comp.emulators.wine.patches |
|---|---|
| Message-ID | <[email protected]> |
Signed-off-by: Huw Davies <[email protected]> --- dlls/user32/misc.c | 1 + dlls/user32/winpos.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c index fa0502e25e..895ccce312 100644 --- a/dlls/user32/misc.c +++ b/dlls/user32/misc.c @@ -415,6 +415,7 @@ HMONITOR WINAPI MonitorFromWindow(HWND hWnd, DWORD dwFlags) TRACE("(%p, 0x%08x)\n", hWnd, dwFlags); + wp.length = sizeof(wp); if (IsIconic(hWnd) && GetWindowPlacement(hWnd, &wp)) return MonitorFromRect( &wp.rcNormalPosition, dwFlags ); diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index 6b6b26a7c8..10f0fd0699 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -1255,6 +1255,8 @@ UINT WINAPI GetInternalWindowPos( HWND hwnd, LPRECT rectWnd, LPPOINT ptIcon ) { WINDOWPLACEMENT wndpl; + + wndpl.length = sizeof(wndpl); if (GetWindowPlacement( hwnd, &wndpl )) { if (rectWnd) *rectWnd = wndpl.rcNormalPosition; -- 2.12.0