Avoid crashing when opening new windows. Appears to be related to more

strict validation in libX11.

ok jasper
This commit is contained in:
ckuethe 2007-05-17 17:31:33 +00:00
parent 3b1121bd22
commit 0de05cd0aa
2 changed files with 16 additions and 2 deletions

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.23 2007/03/25 19:38:39 aanriot Exp $
# $OpenBSD: Makefile,v 1.24 2007/05/17 17:31:33 ckuethe Exp $
COMMENT= "open source client for Windows Terminal Server"
DISTNAME= rdesktop-1.5.0
PKGNAME= ${DISTNAME}p0
PKGNAME= ${DISTNAME}p1
CATEGORIES= x11 net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=rdesktop/}

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-xwin_c,v 1.4 2007/05/17 17:31:33 ckuethe Exp $
--- xwin.c.orig Wed Apr 25 12:03:29 2007
+++ xwin.c Wed Apr 25 12:04:54 2007
@@ -3221,6 +3221,10 @@ ui_desktop_restore(uint32 offset, int x, int y, int cx
image = XCreateImage(g_display, g_visual, g_depth, ZPixmap, 0,
(char *) data, cx, cy, BitmapPad(g_display), cx * g_bpp / 8);
+ if (image == NULL)
+ image = XCreateImage(g_display, g_visual, g_depth, ZPixmap, 0,
+ (char *) data, cx, cy, BitmapPad(g_display), 0);
+
if (g_ownbackstore)
{
XPutImage(g_display, g_backstore, g_gc, image, 0, 0, x, y, cx, cy);