From 19f99d66ba8908aaaf2a1e235b03eca58ed178bb Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Tue, 31 Jan 2012 14:33:49 +0100 Subject: [PATCH] Each bitmap send by the server contains color depth. Even if we negotiated 8bpp server can send bitmap which has 16bpp. Fix a crash using bpp to allocate image from the bitmap data instead of negotiated color depth. --- client/X11/xf_graphics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/X11/xf_graphics.c b/client/X11/xf_graphics.c index ed5f9bc25..0f3ab7c79 100644 --- a/client/X11/xf_graphics.c +++ b/client/X11/xf_graphics.c @@ -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) {