From eefd1c319155e331e353ec910cf063477dd48cb9 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 7 Jan 2011 13:11:05 +0000 Subject: [PATCH] gdevcups: use correct width and height values when allocating memory (upstream bug 691733). --- ghostscript-width-height.patch | 12 ++++++++++++ ghostscript.spec | 11 ++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 ghostscript-width-height.patch diff --git a/ghostscript-width-height.patch b/ghostscript-width-height.patch new file mode 100644 index 0000000..95a301b --- /dev/null +++ b/ghostscript-width-height.patch @@ -0,0 +1,12 @@ +diff -up ghostscript-9.00/cups/gdevcups.c.width-height ghostscript-9.00/cups/gdevcups.c +--- ghostscript-9.00/cups/gdevcups.c.width-height 2011-01-07 11:59:02.093383442 +0000 ++++ ghostscript-9.00/cups/gdevcups.c 2011-01-07 11:59:48.520453332 +0000 +@@ -3460,7 +3460,7 @@ cups_put_params(gx_device *pdev, /* + sp = ((gx_device_printer *)pdev)->space_params; + + if ((code = gdev_prn_maybe_realloc_memory((gx_device_printer *)pdev, &sp, +- width_old, height_old, ++ width, height, + cups->page_uses_transparency)) + < 0) + return (code); diff --git a/ghostscript.spec b/ghostscript.spec index 30ad56e..6dabad3 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -5,7 +5,7 @@ Summary: A PostScript interpreter and renderer Name: ghostscript Version: %{gs_ver} -Release: 7%{?dist} +Release: 8%{?dist} # Included CMap data is Redistributable, no modification permitted, # see http://bugzilla.redhat.com/487510 @@ -29,6 +29,7 @@ Patch21: ghostscript-jbig2-image-refcount.patch Patch27: ghostscript-Fontmap.local.patch Patch28: ghostscript-iccprofiles-initdir.patch Patch29: ghostscript-gdevcups-debug-uninit.patch +Patch30: ghostscript-width-height.patch Requires: urw-fonts >= 1.1, ghostscript-fonts BuildRequires: xz @@ -145,6 +146,10 @@ rm -rf libpng zlib jpeg jasper # gdevcups: don't use uninitialized variables in debugging output. %patch29 -p1 -b .gdevcups-debug-uninit +# gdevcups: use correct width and height values when allocating memory +# (upstream bug 691733). +%patch30 -p1 -b .width-height + # Convert manual pages to UTF-8 from8859_1() { iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_" @@ -332,6 +337,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libgs.so %changelog +* Fri Jan 7 2011 Tim Waugh 9.00-8 +- gdevcups: use correct width and height values when allocating memory + (upstream bug 691733). + * Fri Nov 26 2010 Tim Waugh 9.00-7 - Fixed more summaries ending with ".".