Each bitmap send by the server contains color depth. Even if we negotiated 8bpp serve...
authorPawel Jakub Dawidek <pawel@dawidek.net>
Tue, 31 Jan 2012 13:33:49 +0000 (14:33 +0100)
committerPawel Jakub Dawidek <pawel@dawidek.net>
Tue, 31 Jan 2012 15:14:54 +0000 (16:14 +0100)
Fix a crash using bpp to allocate image from the bitmap data instead of negotiated color depth.

client/X11/xf_graphics.c

index ed5f9bc..0f3ab7c 100644 (file)
@@ -43,7 +43,7 @@ void xf_Bitmap_New(rdpContext* context, rdpBitmap* bitmap)
        if (bitmap->data != NULL)
        {
                data = freerdp_image_convert(bitmap->data, NULL,
-                               bitmap->width, bitmap->height, xfi->srcBpp, xfi->bpp, xfi->clrconv);
+                               bitmap->width, bitmap->height, bitmap->bpp, xfi->bpp, xfi->clrconv);
 
                if (bitmap->ephemeral != true)
                {