1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## no-cant-refill-scanner-input-buffer-error.dpatch by <till.kamppeter@gmail.com>
4
## All lines beginning with `## DP:' are a description of the patch.
8
diff -urNad ghostscript-8.71.dfsg.1~/base/seexec.c ghostscript-8.71.dfsg.1/base/seexec.c
9
--- ghostscript-8.71.dfsg.1~/base/seexec.c 2009-08-14 06:12:58.000000000 +0200
10
+++ ghostscript-8.71.dfsg.1/base/seexec.c 2010-02-24 10:02:20.295231460 +0100
12
r.limit = r.ptr + ss->hex_left;
13
status = s_hex_process(&r, pw, &ss->odd,
14
(ss->is_leading_space ? hex_ignore_leading_whitespace : hex_break_on_whitespace));
15
- ss->is_leading_space = (status == 2);
17
+ ss->is_leading_space = true;
20
+ ss->is_leading_space = false;
22
ss->hex_left -= r.ptr - start;
24
diff -urNad ghostscript-8.71.dfsg.1~/base/sstring.c ghostscript-8.71.dfsg.1/base/sstring.c
25
--- ghostscript-8.71.dfsg.1~/base/sstring.c 2009-08-13 21:04:34.000000000 +0200
26
+++ ghostscript-8.71.dfsg.1/base/sstring.c 2010-02-24 10:02:20.295231460 +0100
28
/* ------ Utilities ------ */
31
- * Convert hex data to binary. Return 1 if we filled the string, 0 if
32
- * we ran out of input data before filling the string, or ERRC on error.
33
+ * Convert hex data to binary.
34
+ * Return 1 if we filled the string,
35
+ * 0 if we ran out of input data before filling the string,
36
+ * 2 if hex_break_on_whitespace is on and we encounrered
39
* The caller must set *odd_digit to -1 before the first call;
40
* after each call, if an odd number of hex digits has been read (total),
41
* *odd_digit is the odd digit value, otherwise *odd_digit = -1.
42
diff -urNad ghostscript-8.71.dfsg.1~/psi/iscan.c ghostscript-8.71.dfsg.1/psi/iscan.c
43
--- ghostscript-8.71.dfsg.1~/psi/iscan.c 2009-11-11 14:52:23.000000000 +0100
44
+++ ghostscript-8.71.dfsg.1/psi/iscan.c 2010-02-24 10:02:20.295231460 +0100
49
- /* No more data available, but no exception. How can this be? */
50
- lprintf("Can't refill scanner input buffer!");
51
- return_error(e_Fatal);
52
+ /* No more data available, but no exception. */
53
+ /* A filter is consuming headers but returns nothing. */