Blame SOURCES/0001-canvas-base-Fix-width-computation-for-palette-images.patch

18559f
From 3b4759ce15325e2de1b473d619b69ae786c2fcec Mon Sep 17 00:00:00 2001
18559f
From: Frediano Ziglio <fziglio@redhat.com>
18559f
Date: Thu, 21 Dec 2017 15:54:04 +0000
18559f
Subject: [PATCH spice-common] canvas-base: Fix width computation for palette
18559f
 images
18559f
18559f
Palette images are encoded with a slightly larger pixel than
18559f
width. This cause a wrong calculation of stride_encoded value
18559f
which cause a wrong stride adjustment.
18559f
18559f
This fix bug https://bugzilla.redhat.com/show_bug.cgi?id=1508847.
18559f
18559f
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
18559f
---
18559f
 common/canvas_base.c | 2 +-
18559f
 1 file changed, 1 insertion(+), 1 deletion(-)
18559f
18559f
diff --git a/common/canvas_base.c b/common/canvas_base.c
18559f
index a9d7855..2ecd276 100644
18559f
--- a/spice-common/common/canvas_base.c
18559f
+++ b/spice-common/common/canvas_base.c
18559f
@@ -824,7 +824,7 @@ static pixman_image_t *canvas_get_lz(CanvasBase *canvas, SpiceImage *image,
18559f
     lz_decode_begin(lz_data->lz, comp_buf, comp_size, &type,
18559f
                     &width, &height, &n_comp_pixels, &top_down, palette);
18559f
 
18559f
-    stride_encoded = width;
18559f
+    stride_encoded = n_comp_pixels / height;
18559f
     switch (type) {
18559f
     case LZ_IMAGE_TYPE_RGBA:
18559f
         as_type = LZ_IMAGE_TYPE_RGBA;
18559f
-- 
18559f
2.14.3
18559f