Fix #4101: Rfx decode tile width.
authorArmin Novak <armin.novak@thincast.com>
Mon, 20 Nov 2017 12:42:40 +0000 (13:42 +0100)
committerArmin Novak <armin.novak@thincast.com>
Tue, 21 Nov 2017 10:08:16 +0000 (11:08 +0100)
libfreerdp/codec/rfx.c

index ce03a74..39b9782 100644 (file)
@@ -1150,7 +1150,7 @@ BOOL rfx_process_message(RFX_CONTEXT* context, const BYTE* data, UINT32 length,
                REGION16 clippingRects;
                const RECTANGLE_16* updateRects;
                const DWORD formatSize = GetBytesPerPixel(context->pixel_format);
-               const UINT32 dstWidth = dstStride / formatSize;
+               const UINT32 dstWidth = dstStride / GetBytesPerPixel(dstFormat);
                region16_init(&clippingRects);
 
                for (i = 0; i < message->numRects; i++)