From 92552fba1ef3cd320d11e5f8996db10061a20de9 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 2 Sep 2010 13:05:00 +0100 Subject: [PATCH] Applied patch to fix NULL dereference in bbox driver (bug #591624). --- ghostscript-bbox-close.patch | 12 ++++++++++++ ghostscript.spec | 5 +++++ 2 files changed, 17 insertions(+) create mode 100644 ghostscript-bbox-close.patch diff --git a/ghostscript-bbox-close.patch b/ghostscript-bbox-close.patch new file mode 100644 index 0000000..7f6ab72 --- /dev/null +++ b/ghostscript-bbox-close.patch @@ -0,0 +1,12 @@ +diff -up ghostscript-8.71/base/gdevbbox.c.bbox-close ghostscript-8.71/base/gdevbbox.c +--- ghostscript-8.71/base/gdevbbox.c.bbox-close 2010-01-19 15:48:57.000000000 +0000 ++++ ghostscript-8.71/base/gdevbbox.c 2010-09-02 13:03:37.742943978 +0100 +@@ -249,7 +249,7 @@ bbox_close_device(gx_device * dev) + * This device was created as a wrapper for a compositor. + * Just free the devices. + */ +- int code = (bdev->forward_open_close ? gs_closedevice(tdev) : 0); ++ int code = (tdev && bdev->forward_open_close ? gs_closedevice(tdev) : 0); + + gs_free_object(dev->memory, dev, "bbox_close_device(composite)"); + return code; diff --git a/ghostscript.spec b/ghostscript.spec index 59d6ebc..d20b29c 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -40,6 +40,7 @@ Patch21: ghostscript-jbig2-image-refcount.patch Patch22: ghostscript-SEARCH_HERE_FIRST.patch Patch23: ghostscript--P-.patch Patch24: ghostscript-epstopdf-failure.patch +Patch25: ghostscript-bbox-close.patch Requires: urw-fonts >= 1.1, ghostscript-fonts BuildRequires: xz @@ -186,6 +187,9 @@ rm -rf libpng zlib jpeg jasper # Avoid epstopdf failure using upstream patch (bug #627390). %patch24 -p1 -b .epstopdf-failure +# Applied patch to fix NULL dereference in bbox driver (bug #591624). +%patch25 -p1 -b .bbox-close + # Convert manual pages to UTF-8 from8859_1() { iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_" @@ -375,6 +379,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Thu Sep 2 2010 Tim Waugh 8.71-12 +- Applied patch to fix NULL dereference in bbox driver (bug #591624). - Applied upstream patch to fix iname.c segfault (bug #465311). * Thu Aug 26 2010 Tim Waugh 8.71-11