Avoid epstopdf failure using upstream patch (bug #627390).

This commit is contained in:
Tim Waugh 2010-08-26 14:54:26 +01:00
parent 51b02415a0
commit c755f33188
2 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1,50 @@
diff -up ghostscript-8.71/base/seexec.c.epstopdf-failure ghostscript-8.71/base/seexec.c
--- ghostscript-8.71/base/seexec.c.epstopdf-failure 2009-08-14 05:12:58.000000000 +0100
+++ ghostscript-8.71/base/seexec.c 2010-08-26 14:53:05.662840885 +0100
@@ -165,7 +165,11 @@ hp: r = *pr;
r.limit = r.ptr + ss->hex_left;
status = s_hex_process(&r, pw, &ss->odd,
(ss->is_leading_space ? hex_ignore_leading_whitespace : hex_break_on_whitespace));
- ss->is_leading_space = (status == 2);
+ if (status == 2) {
+ ss->is_leading_space = true;
+ status = 1;
+ } else
+ ss->is_leading_space = false;
pr->ptr = r.ptr;
ss->hex_left -= r.ptr - start;
/*
diff -up ghostscript-8.71/base/sstring.c.epstopdf-failure ghostscript-8.71/base/sstring.c
--- ghostscript-8.71/base/sstring.c.epstopdf-failure 2009-08-13 20:04:34.000000000 +0100
+++ ghostscript-8.71/base/sstring.c 2010-08-26 14:53:05.663840592 +0100
@@ -355,8 +355,12 @@ const stream_template s_PSSD_template =
/* ------ Utilities ------ */
/*
- * Convert hex data to binary. Return 1 if we filled the string, 0 if
- * we ran out of input data before filling the string, or ERRC on error.
+ * Convert hex data to binary.
+ * Return 1 if we filled the string,
+ * 0 if we ran out of input data before filling the string,
+ * 2 if hex_break_on_whitespace is on and we encounrered
+ * a white space.
+ * ERRC on error.
* The caller must set *odd_digit to -1 before the first call;
* after each call, if an odd number of hex digits has been read (total),
* *odd_digit is the odd digit value, otherwise *odd_digit = -1.
diff -up ghostscript-8.71/psi/iscan.c.epstopdf-failure ghostscript-8.71/psi/iscan.c
--- ghostscript-8.71/psi/iscan.c.epstopdf-failure 2009-11-11 13:52:23.000000000 +0000
+++ ghostscript-8.71/psi/iscan.c 2010-08-26 14:53:05.665840572 +0100
@@ -329,9 +329,9 @@ scan_handle_refill(i_ctx_t *i_ctx_p, sca
rstate, 1, cont);
}
}
- /* No more data available, but no exception. How can this be? */
- lprintf("Can't refill scanner input buffer!");
- return_error(e_Fatal);
+ /* No more data available, but no exception. */
+ /* A filter is consuming headers but returns nothing. */
+ return 0;
}
/*

View File

@ -38,6 +38,7 @@ Patch20: ghostscript-CVE-2010-1628.patch
Patch21: ghostscript-jbig2-image-refcount.patch
Patch22: ghostscript-SEARCH_HERE_FIRST.patch
Patch23: ghostscript--P-.patch
Patch24: ghostscript-epstopdf-failure.patch
Requires: urw-fonts >= 1.1, ghostscript-fonts
BuildRequires: xz
@ -178,6 +179,9 @@ rm -rf libpng zlib jpeg jasper
# Use -P- and -dSAFER in scripts (bug #599564).
%patch23 -p1 -b .-P-
# Avoid epstopdf failure using upstream patch (bug #627390).
%patch24 -p1 -b .epstopdf-failure
# Convert manual pages to UTF-8
from8859_1() {
iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_"
@ -367,6 +371,7 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Thu Aug 26 2010 Tim Waugh <twaugh@redhat.com> 8.71-11
- Avoid epstopdf failure using upstream patch (bug #627390).
- More upstream fixes for bug #599564.
* Wed Aug 25 2010 Tim Waugh <twaugh@redhat.com> 8.71-10