- Don't segfault closing tiffg3 device if opening failed (bug #571520).

This commit is contained in:
Tim Waugh 2010-03-12 12:10:34 +00:00
parent d12a8ce983
commit 51650e03ec
2 changed files with 23 additions and 1 deletions

View File

@ -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);
}

View File

@ -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 <twaugh@redhat.com> 8.71-4.1
- Don't segfault closing tiffg3 device if opening failed (bug #571520).
* Sat Feb 20 2010 Tim Waugh <twaugh@redhat.com> 8.71-4
- Actually revert the upstream gdevcups changes (bug #563313).
- Fixed pdf2dsc.ps (bug #565935).