[ghostscript/f19] Use upstream patch to fix gs segfault (bug #1039718).

Tim Waugh twaugh at fedoraproject.org
Tue Dec 10 16:53:30 UTC 2013


commit 7237d438e399b1af04696358d09610d0ef04b55d
Author: Tim Waugh <twaugh at redhat.com>
Date:   Tue Dec 10 16:19:57 2013 +0000

    Use upstream patch to fix gs segfault (bug #1039718).
    
    Resolves: rhbz#1039718

 ghostscript-gs694809.patch |   37 +++++++++++++++++++++++++++++++++++++
 ghostscript.spec           |    6 +++++-
 2 files changed, 42 insertions(+), 1 deletions(-)
---
diff --git a/ghostscript-gs694809.patch b/ghostscript-gs694809.patch
new file mode 100644
index 0000000..7db205d
--- /dev/null
+++ b/ghostscript-gs694809.patch
@@ -0,0 +1,37 @@
+diff -up ghostscript-9.10/Resource/Init/pdf_draw.ps.gs694809 ghostscript-9.10/Resource/Init/pdf_draw.ps
+--- ghostscript-9.10/Resource/Init/pdf_draw.ps.gs694809	2013-08-30 11:37:29.000000000 +0100
++++ ghostscript-9.10/Resource/Init/pdf_draw.ps	2013-12-10 16:15:47.066351541 +0000
+@@ -2307,18 +2307,23 @@ end
+                 % Stack: scalex scaley annot appearance true
+                 % Stack: scalex scaley annot false
+     {
++      dup type /dicttype eq {
+                 % Draw appearance
+                 % Initialize graphic following "7.4.4 Appearance Streams"
+-      q graphicsbeginpage textbeginpage
+-      1 index annotrect pop pop translate
+-      3 index 3 index scale	% Apply scale factors
+-      dup /BBox knownoget {
+-        1 index /Matrix knownoget not { {1 0 0 1 0 0} } if
+-        .bbox_transform pop pop
+-        % Compensate for non-zero origin of BBox
+-        neg exch neg exch translate
+-      } if
+-      DoForm Q
++        q graphicsbeginpage textbeginpage
++        1 index annotrect pop pop translate
++        3 index 3 index scale	% Apply scale factors
++        dup /BBox knownoget {
++          1 index /Matrix knownoget not { {1 0 0 1 0 0} } if
++          .bbox_transform pop pop
++          % Compensate for non-zero origin of BBox
++          neg exch neg exch translate
++        } if
++        DoForm Q
++      } {
++        (   **** Annotation's appearance is not a dictionary.\n)
++        pdfformaterror
++      } ifelse
+     } if
+   } {
+     dup /MK knownoget {    % mk
diff --git a/ghostscript.spec b/ghostscript.spec
index 576e860..d5240c8 100644
--- a/ghostscript.spec
+++ b/ghostscript.spec
@@ -31,6 +31,7 @@ Patch7: ghostscript-iccprofiles-initdir.patch
 Patch8: ghostscript-gdevcups-debug-uninit.patch
 Patch9: ghostscript-wrf-snprintf.patch
 Patch10: ghostscript-gs694154.patch
+Patch11: ghostscript-gs694809.patch
 
 Requires: urw-fonts >= 1.1, ghostscript-fonts
 Requires: poppler-data
@@ -134,6 +135,9 @@ rm -rf expat freetype icclib jasper jpeg jpegxr lcms lcms2 libpng openjpeg zlib
 # Use upstream patch to fix gs segfault (bug #1036428).
 %patch10 -p1 -b .gs694154
 
+# Use upstream patch to fix gs segfault (bug #1039718).
+%patch11 -p1 -b .gs694809
+
 # Convert manual pages to UTF-8
 from8859_1() {
         iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_"
@@ -325,7 +329,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %changelog
 * Tue Dec 10 2013 Tim Waugh <twaugh at redhat.com> 9.10-5
-- Use upstream patch to fix gs segfault (bug #1036428).
+- Use upstream patches to fix gs segfaults (bug #1026428, bug #1039718).
 
 * Wed Sep 25 2013 Tim Waugh <twaugh at redhat.com> 9.09-4
 - Regenerate tarball (bug #1000387).


More information about the scm-commits mailing list