Cap window sizes at 65535.

This commit is contained in:
Michael Cardenas 2002-05-07 01:52:15 +00:00 committed by Alexandre Julliard
parent 127ec92b24
commit f0b6b9a1ba
1 changed files with 11 additions and 0 deletions

View File

@ -871,6 +871,17 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
RECT rect;
BOOL ret = FALSE;
if (cs->cx > 65535)
{
ERR( "invalid window width %d\n", cs->cx );
cs->cx = 65535;
}
if (cs->cy > 65535)
{
ERR( "invalid window height %d\n", cs->cx );
cs->cy = 65535;
}
if (!(data = HeapAlloc(GetProcessHeap(), 0, sizeof(*data)))) return FALSE;
data->whole_window = 0;
data->client_window = 0;