Changelog: This patch adds a check on the size of windows that are requested to be created in X11DRV_CreateWindow. It fixes a crash in word when opening documents. It caps window sizes at 65535, since XCreateWindow uses unsigned ints and the X protocol uses int16's. This prevents wine from trying to create windows that cause the X server to error out, so it prevents a crash in wine. it is a patch against the 04/23/2002 cvs. files affected: dlls/x11drv/window.c -- michael cardenas lead windows compatibility engineer lindows.com "Be the change you want to see in the world" -Mahatma Gandhi
--- winehq/dlls/x11drv/window.c Sat Mar 9 18:44:35 2002 +++ wine/dlls/x11drv/window.c Wed May 1 17:14:08 2002 @@ -871,6 +885,15 @@ RECT rect; BOOL ret = FALSE; + TRACE("in\n"); + + /*mbc - sanity checking sizes, if they are too large, the X server stops and wine crashes*/ + + if(cs->cx > 65535) + cs->cx = 65535; + if(cs->cy > 65535) + cs->cy = 65535; + if (!(data = HeapAlloc(GetProcessHeap(), 0, sizeof(*data)))) return FALSE; data->whole_window = 0; data->client_window = 0;