Comment 8 for bug 104332

Revision history for this message
mheily (mark-heily) wrote : Re: [PATCH] rdesktop segfault with libx11-6 1.0.3-7

Here is a corrected patch that fixes the segfault and correctly redraws the desktop image. This has
been tested with a Windows 2000 Server at 8bpp and a Windows 2003 server at 16bpp.

Thanks to Mat G for his suggestion on how to fix my original patch.

-Mark

--- ../rdesktop/xwin.c 2007-01-17 02:39:31.000000000 -0500
+++ xwin.c 2007-04-12 09:51:46.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, g_bpp, 0);

  if (g_ownbackstore)
  {