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

Resolves: rhbz#1039718
This commit is contained in:
Tim Waugh 2013-12-10 16:19:57 +00:00
parent 80985fa14c
commit 7237d438e3
2 changed files with 42 additions and 1 deletions

View File

@ -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

View File

@ -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@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@redhat.com> 9.09-4
- Regenerate tarball (bug #1000387).