From 51650e03ec018de3c9c802521ba4a0fcf7463f66 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 12 Mar 2010 12:10:34 +0000 Subject: [PATCH] - Don't segfault closing tiffg3 device if opening failed (bug #571520). --- ghostscript-tif-fail-close.patch | 13 +++++++++++++ ghostscript.spec | 11 ++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 ghostscript-tif-fail-close.patch diff --git a/ghostscript-tif-fail-close.patch b/ghostscript-tif-fail-close.patch new file mode 100644 index 0000000..675578b --- /dev/null +++ b/ghostscript-tif-fail-close.patch @@ -0,0 +1,13 @@ +diff -up ghostscript-8.71/base/gdevtfax.c.tif-fail-close ghostscript-8.71/base/gdevtfax.c +--- ghostscript-8.71/base/gdevtfax.c.tif-fail-close 2010-03-12 10:57:43.514750465 +0000 ++++ ghostscript-8.71/base/gdevtfax.c 2010-03-12 10:58:38.253627230 +0000 +@@ -97,7 +97,8 @@ tfax_close(gx_device * pdev) + { + gx_device_tfax *const tfdev = (gx_device_tfax *)pdev; + +- TIFFCleanup(tfdev->tif); ++ if (tfdev->tif) ++ TIFFCleanup(tfdev->tif); + + return gdev_prn_close(pdev); + } diff --git a/ghostscript.spec b/ghostscript.spec index 80cb497..8170ab2 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -5,7 +5,7 @@ Summary: A PostScript interpreter and renderer. Name: ghostscript Version: %{gs_ver} -Release: 4%{?dist} +Release: 4.1%{?dist} # Included CMap data is Redistributable, no modification permitted, # see http://bugzilla.redhat.com/487510 @@ -32,6 +32,7 @@ Patch13: ghostscript-pdftoraster-exit.patch Patch14: ghostscript-ldflags.patch Patch15: ghostscript-pdf2dsc.patch Patch16: ghostscript-gdevcups-y-axis.patch +Patch17: ghostscript-tif-fail-close.patch Requires: urw-fonts >= 1.1, ghostscript-fonts BuildRequires: xz @@ -152,6 +153,9 @@ rm -rf libpng zlib jpeg jasper # Actually revert the upstream gdevcups changes (bug #563313). %patch16 -p1 -b .gdevcups-y-axis +# Don't segfault closing tiffg3 device if opening failed (bug #571520). +%patch17 -p1 -b .tif-fail-close + # Convert manual pages to UTF-8 from8859_1() { iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_" @@ -171,6 +175,8 @@ for i in man/de/*.1; do from8859_1 "$i"; done # zfunc0.c zfunc3.c zfunc4.c zpcolor.c zshade.c EXTRACFLAGS="-fno-strict-aliasing" +rm -rf tiff + FONTPATH= for path in \ %{_datadir}/fonts/default/%{name} \ @@ -338,6 +344,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libgs.so %changelog +* Fri Mar 12 2010 Tim Waugh 8.71-4.1 +- Don't segfault closing tiffg3 device if opening failed (bug #571520). + * Sat Feb 20 2010 Tim Waugh 8.71-4 - Actually revert the upstream gdevcups changes (bug #563313). - Fixed pdf2dsc.ps (bug #565935).