Commit 4ecda80c authored by Patrick Rudolph's avatar Patrick Rudolph Committed by Alexandre Julliard

user32: Check for valid cbSize in GetMonitorInfoW.

parent d1f55471
......@@ -440,7 +440,12 @@ BOOL WINAPI GetMonitorInfoA(HMONITOR hMonitor, LPMONITORINFO lpMonitorInfo)
*/
BOOL WINAPI GetMonitorInfoW(HMONITOR hMonitor, LPMONITORINFO lpMonitorInfo)
{
BOOL ret = USER_Driver->pGetMonitorInfo( hMonitor, lpMonitorInfo );
BOOL ret;
if (lpMonitorInfo->cbSize != sizeof(MONITORINFOEXW) && lpMonitorInfo->cbSize != sizeof(MONITORINFO))
return FALSE;
ret = USER_Driver->pGetMonitorInfo( hMonitor, lpMonitorInfo );
if (ret)
TRACE("flags %04x, monitor %s, work %s\n", lpMonitorInfo->dwFlags,
wine_dbgstr_rect(&lpMonitorInfo->rcMonitor),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment