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 dec1d4a..9a076f6 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -32,6 +32,7 @@ Patch13: ghostscript-pdftoraster-exit.patch Patch14: ghostscript-ldflags.patch Patch15: ghostscript-pdf2dsc.patch Patch16: ghostscript-cups-realloc-color-depth.patch +Patch17: ghostscript-tif-fail-close.patch Requires: urw-fonts >= 1.1, ghostscript-fonts BuildRequires: xz @@ -154,6 +155,9 @@ rm -rf libpng zlib jpeg jasper # Reallocate memory in gdevcups when color depth changes (bug #563313). %patch16 -p1 -b .cups-realloc-color-depth +# 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}_" @@ -334,6 +338,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Mon Mar 15 2010 Tim Waugh 8.71-8 +- Don't segfault closing tiffg3 device if opening failed (bug #571520). - Don't revert gdevcups y-axis change (bug #541604). - Reallocate memory in gdevcups when color depth changes (bug #563313).