diff --git a/ghostscript-jbig2-image-refcount.patch b/ghostscript-jbig2-image-refcount.patch deleted file mode 100644 index 6054273..0000000 --- a/ghostscript-jbig2-image-refcount.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -up ghostscript-8.71/jbig2dec/jbig2_image.c.jbig2-image-refcount ghostscript-8.71/jbig2dec/jbig2_image.c ---- ghostscript-8.71/jbig2dec/jbig2_image.c.jbig2-image-refcount 2010-08-05 14:55:56.417043303 +0100 -+++ ghostscript-8.71/jbig2dec/jbig2_image.c 2010-08-05 14:56:46.796169065 +0100 -@@ -60,15 +60,18 @@ Jbig2Image* jbig2_image_new(Jbig2Ctx *ct - /* clone an image pointer by bumping its reference count */ - Jbig2Image* jbig2_image_clone(Jbig2Ctx *ctx, Jbig2Image *image) - { -- image->refcount++; -+ if (image) -+ image->refcount++; - return image; - } - - /* release an image pointer, freeing it it appropriate */ - void jbig2_image_release(Jbig2Ctx *ctx, Jbig2Image *image) - { -- image->refcount--; -- if (!image->refcount) jbig2_image_free(ctx, image); -+ if (image) { -+ image->refcount--; -+ if (!image->refcount) jbig2_image_free(ctx, image); -+ } - } - - /* free a Jbig2Image structure and its associated memory */ diff --git a/ghostscript.spec b/ghostscript.spec index 63df18e..1e4aa06 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -26,7 +26,6 @@ Patch7: ghostscript-pksmraw.patch Patch8: ghostscript-jbig2dec-nullderef.patch Patch10: ghostscript-cups-filters.patch Patch12: ghostscript-vsnprintf.patch -Patch21: ghostscript-jbig2-image-refcount.patch Patch27: ghostscript-Fontmap.local.patch Patch28: ghostscript-iccprofiles-initdir.patch Patch29: ghostscript-gdevcups-debug-uninit.patch @@ -140,9 +139,6 @@ rm -rf libpng zlib jpeg jasper expat # Harden ghostscript's debugging output functions (bug #540760). %patch12 -p1 -b .vsnprintf -# Avoid another NULL pointer dereference in jbig2 code (bug #621569). -%patch21 -p1 -b .jbig2-image-refcount - # Restored Fontmap.local patch, incorrectly dropped after # ghostscript-8.15.4-3 (bug #610301). # Note: don't use -b here to avoid the backup file ending up in the @@ -354,6 +350,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Mon Aug 1 2011 Tim Waugh 9.02-5 +- No longer need jbig2-image-refcount patch. - Fixed error reporting in the gstoraster filter. * Wed May 25 2011 Tim Waugh 9.02-4