From 08200f2b5dc6c1df737341bea5085700d5ee438a Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 11 Jul 2013 12:15:41 +0100 Subject: [PATCH] Avoid sign-extending CRCs for gz decompression (bug #983486). Resolves: rhbz#983486 --- cups-gz-crc.patch | 14 ++++++++++++++ cups.spec | 8 +++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 cups-gz-crc.patch diff --git a/cups-gz-crc.patch b/cups-gz-crc.patch new file mode 100644 index 0000000..699e5e4 --- /dev/null +++ b/cups-gz-crc.patch @@ -0,0 +1,14 @@ +diff -up cups-1.6.2/cups/file.c.gz-crc cups-1.6.2/cups/file.c +--- cups-1.6.2/cups/file.c.gz-crc 2013-07-11 12:06:49.920878639 +0100 ++++ cups-1.6.2/cups/file.c 2013-07-11 12:13:41.169628104 +0100 +@@ -2429,8 +2429,8 @@ cups_fill(cups_file_t *fp) /* I - CUPS + } + else + { +- tcrc = (((((trailer[3] << 8) | trailer[2]) << 8) | trailer[1]) << 8) | +- trailer[0]; ++ tcrc = (((uLong) ((trailer[3] << 8) | trailer[2])) << 16) | ++ (uLong) ((trailer[1] << 8) | trailer[0]); + + if (tcrc != fp->crc) + { diff --git a/cups.spec b/cups.spec index dbe5898..8987b5c 100644 --- a/cups.spec +++ b/cups.spec @@ -11,7 +11,7 @@ Summary: CUPS printing system Name: cups Epoch: 1 Version: 1.6.2 -Release: 17%{?dist} +Release: 18%{?dist} License: GPLv2 Group: System Environment/Daemons Url: http://www.cups.org/ @@ -62,6 +62,7 @@ Patch31: cups-dymo-deviceid.patch Patch32: cups-use-ipp1.1.patch Patch33: cups-no-gcry.patch Patch34: cups-avahi-no-threaded.patch +Patch35: cups-gz-crc.patch Patch100: cups-lspp.patch @@ -247,6 +248,8 @@ Sends IPP requests to the specified URI and tests and/or displays the results. %patch33 -p1 -b .no-gcry # Don't use D-Bus from two threads (bug #979748). %patch34 -p1 -b .avahi-no-threaded +# Avoid sign-extending CRCs for gz decompression (bug #983486). +%patch35 -p1 -b .gz-crc %if %lspp # LSPP support. @@ -640,6 +643,9 @@ rm -f %{cups_serverbin}/backend/smb %{_mandir}/man5/ipptoolfile.5.gz %changelog +* Thu Jul 11 2013 Tim Waugh 1:1.6.2-18 +- Avoid sign-extending CRCs for gz decompression (bug #983486). + * Wed Jul 10 2013 Tim Waugh 1:1.6.2-17 - Fixed download URL.