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

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