From f9f0f1a8e12baef15a86bdc6f21cab82b1329eaa Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 14 Oct 2010 15:21:08 +0100 Subject: [PATCH] gdevcups: don't use uninitialized variables in debugging output (Ghostscript bug #691683). --- ghostscript-gdevcups-debug-uninit.patch | 15 +++++++++++++++ ghostscript.spec | 10 +++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 ghostscript-gdevcups-debug-uninit.patch diff --git a/ghostscript-gdevcups-debug-uninit.patch b/ghostscript-gdevcups-debug-uninit.patch new file mode 100644 index 0000000..02a6403 --- /dev/null +++ b/ghostscript-gdevcups-debug-uninit.patch @@ -0,0 +1,15 @@ +diff -up ghostscript-8.71/cups/gdevcups.c.gdevcups-debug-uninit ghostscript-8.71/cups/gdevcups.c +--- ghostscript-8.71/cups/gdevcups.c.gdevcups-debug-uninit 2010-10-14 15:08:41.243869988 +0100 ++++ ghostscript-8.71/cups/gdevcups.c 2010-10-14 15:09:45.151869961 +0100 +@@ -3299,8 +3299,9 @@ cups_put_params(gx_device *pdev, /* + dprintf1("DEBUG2: ppd = %p\n", cupsPPD); + dprintf2("DEBUG2: PageSize = [ %.3f %.3f ]\n", + pdev->MediaSize[0], pdev->MediaSize[1]); +- dprintf4("DEBUG2: margins = [ %.3f %.3f %.3f %.3f ]\n", +- margins[0], margins[1], margins[2], margins[3]); ++ if (size_set) ++ dprintf4("DEBUG2: margins = [ %.3f %.3f %.3f %.3f ]\n", ++ margins[0], margins[1], margins[2], margins[3]); + dprintf2("DEBUG2: HWResolution = [ %.3f %.3f ]\n", + pdev->HWResolution[0], pdev->HWResolution[1]); + dprintf2("DEBUG2: width = %d, height = %d\n", diff --git a/ghostscript.spec b/ghostscript.spec index 8ccee02..3de353c 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -5,7 +5,7 @@ Summary: A PostScript interpreter and renderer Name: ghostscript Version: %{gs_ver} -Release: 18%{?dist} +Release: 19%{?dist} # Included CMap data is Redistributable, no modification permitted, # see http://bugzilla.redhat.com/487510 @@ -43,6 +43,7 @@ Patch24: ghostscript-epstopdf-failure.patch Patch25: ghostscript-bbox-close.patch Patch26: ghostscript-gdevcups-ripcache.patch Patch27: ghostscript-Fontmap.local.patch +Patch28: ghostscript-gdevcups-debug-uninit.patch Requires: urw-fonts >= 1.1, ghostscript-fonts BuildRequires: xz @@ -204,6 +205,9 @@ rm -rf libpng zlib jpeg jasper # package manifest. %patch27 -p1 +# gdevcups: don't use uninitialized variables in debugging output. +%patch28 -p1 -b .gdevcups-debug-uninit + # Convert manual pages to UTF-8 from8859_1() { iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_" @@ -385,6 +389,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libgs.so %changelog +* Thu Oct 14 2010 Tim Waugh 8.71-19 +- gdevcups: don't use uninitialized variables in debugging output + (Ghostscript bug #691683). + * Fri Oct 1 2010 Tim Waugh 8.71-18 - Reverted incorrect change introduced to fix bug #635786.