0de05cd0aa
strict validation in libX11. ok jasper
15 lines
600 B
Plaintext
15 lines
600 B
Plaintext
$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);
|