ghostscript/ghostscript-epstopdf-failure.patch

51 lines
2.2 KiB
Diff
Raw Normal View History

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;
}
/*