From 0566ddb28f81e5d24e97f386d3f57047d5ab03d6 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 15 Apr 2013 16:33:26 +0200 Subject: [PATCH] Add fix from upstream for a crash when the guest uses RGBA (rhbz#952242) - Add fix from upstream for a crash when the guest uses RGBA (rhbz#952242) --- ...S_IMAGE_TYPE_-elements-for-LZ_IMAGE_.patch | 39 +++++++++++++++++++ spice.spec | 9 ++++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 0007-supply-missing-IS_IMAGE_TYPE_-elements-for-LZ_IMAGE_.patch diff --git a/0007-supply-missing-IS_IMAGE_TYPE_-elements-for-LZ_IMAGE_.patch b/0007-supply-missing-IS_IMAGE_TYPE_-elements-for-LZ_IMAGE_.patch new file mode 100644 index 0000000..a69cd7b --- /dev/null +++ b/0007-supply-missing-IS_IMAGE_TYPE_-elements-for-LZ_IMAGE_.patch @@ -0,0 +1,39 @@ +From 5aa31e753f1a073c3039998a677a6e19a8b2cd45 Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +Date: Tue, 9 Apr 2013 14:02:09 +0200 +Subject: [PATCH spice-common 1/2] supply missing IS_IMAGE_TYPE_* elements for + LZ_IMAGE_TYPE_A8 + +The IS_IMAGE_TYPE_PLT and IS_IMAGE_TYPE_RGB arrays are supposed to decide +whether each image type is PLT or RGB. Dependent on the result, one of the +PLT_PIXELS_PER_BYTE and RGB_BYTES_PER_PIXEL arrays can be indexed. + +Commit c0b048eb introduced the LZ_IMAGE_TYPE_A8 enum constant and grew the +RGB_BYTES_PER_PIXEL array by one element, but it missed to append a zero +to IS_IMAGE_TYPE_PLT, and a one to IS_IMAGE_TYPE_RGB. Do so now. + +Related RHBZ: 928973. + +Signed-off-by: Laszlo Ersek +--- + common/lz_common.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/common/lz_common.h b/common/lz_common.h +index b5ce212..1a2213a 100644 +--- a/common/lz_common.h ++++ b/common/lz_common.h +@@ -52,8 +52,8 @@ typedef enum { + #define LZ_IMAGE_TYPE_LOG 4 // number of bits required for coding the image type + + /* access to the arrays is based on the image types */ +-static const int IS_IMAGE_TYPE_PLT[] = {0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0}; +-static const int IS_IMAGE_TYPE_RGB[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1}; ++static const int IS_IMAGE_TYPE_PLT[] = {0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}; ++static const int IS_IMAGE_TYPE_RGB[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1}; + static const int PLT_PIXELS_PER_BYTE[] = {0, 8, 8, 2, 2, 1}; + static const int RGB_BYTES_PER_PIXEL[] = {0, 1, 1, 1, 1, 1, 2, 3, 4, 4, 4, 1}; + +-- +1.8.2 + diff --git a/spice.spec b/spice.spec index bd3511d..04a69e9 100644 --- a/spice.spec +++ b/spice.spec @@ -8,7 +8,7 @@ Name: spice Version: 0.12.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Implements the SPICE protocol Group: User Interface/Desktops License: LGPLv2+ @@ -21,6 +21,7 @@ Patch3: 0003-red_worker.c-clearing-the-stream-vis_region-after-it.patch Patch4: 0004-link-libspice-server-with-libm-libpthread.patch Patch5: 0005-server-Fix-SpiceWorker-CRITICAL-red_worker.c-10968-r.patch Patch6: 0006-worker_update_monitors_config-Drop-bogus-real_count-.patch +Patch7: 0007-supply-missing-IS_IMAGE_TYPE_-elements-for-LZ_IMAGE_.patch # https://bugzilla.redhat.com/show_bug.cgi?id=613529 %if 0%{?rhel} @@ -101,6 +102,9 @@ using spice-server, you will need to install spice-server-devel. %patch4 -p1 %patch5 -p1 %patch6 -p1 +pushd spice-common +%patch7 -p1 +popd %build @@ -160,6 +164,9 @@ fi %changelog +* Mon Apr 15 2013 Hans de Goede - 0.12.2-4 +- Add fix from upstream for a crash when the guest uses RGBA (rhbz#952242) + * Thu Mar 07 2013 Adam Jackson 0.12.2-4 - Rebuild for new libsasl2 soname in F19