Comment 7 for bug 104332

Revision history for this message
mheily (mark-heily) wrote : Re: Segmentation Fault (core dumped)

(This is a CC of the message I sent to the Debian BTS and to upstream)

Here is a patch that prevents rdesktop from crashing due to increased Xlib sanity checking
of arguments passed to XCreateImage(3). Thanks to Julien Cristau for his helpful explanation
of the problem on the Debian bug tracking system.

Thanks,

Mark Heily
<email address hidden>

References:

[1] http://<email address hidden>/msg326793.html
[2] https://bugs.launchpad.net/ubuntu/+source/rdesktop/+bug/104332

Patch:

--- ../rdesktop/xwin.c 2007-01-17 02:39:31.000000000 -0500
+++ xwin.c 2007-04-11 11:13:51.000000000 -0400
@@ -3218,7 +3218,7 @@
                return;

        image = XCreateImage(g_display, g_visual, g_depth, ZPixmap, 0,
- (char *) data, cx, cy, BitmapPad(g_display), cx * g_bpp / 8);
+ (char *) data, cx, cy, BitmapPad(g_display), 0);

        if (g_ownbackstore)
        {