summaryrefslogtreecommitdiff
path: root/fitz
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2012-06-27 18:04:57 +0100
committerRobin Watts <robin.watts@artifex.com>2012-06-27 18:06:29 +0100
commit50cc85d465a631c3bdbf204e6ab8bc7c97431eb6 (patch)
tree0cd37ad1641754f81e361b8ea0070231d0d9abd1 /fitz
parent69b926f318b8be17d72345eb32870946e9bd40a0 (diff)
downloadmupdf-50cc85d465a631c3bdbf204e6ab8bc7c97431eb6.tar.xz
Make ASCII85 decoding more tolerant of end of stream errors.
This solves the normal_87.pdf rendering issues.
Diffstat (limited to 'fitz')
-rw-r--r--fitz/filt_basic.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fitz/filt_basic.c b/fitz/filt_basic.c
index 7d504f29..ef6dc920 100644
--- a/fitz/filt_basic.c
+++ b/fitz/filt_basic.c
@@ -350,7 +350,11 @@ read_a85d(fz_stream *stm, unsigned char *buf, int len)
case 0:
break;
case 1:
- fz_throw(stm->ctx, "partial final byte in a85d");
+ /* Specifically illegal in the spec, but adobe
+ * and gs both cope. See normal_87.pdf for a
+ * case where this matters. */
+ fz_warn(stm->ctx, "partial final byte in a85d");
+ break;
case 2:
word = word * (85 * 85 * 85) + 0xffffff;
state->bp[0] = word >> 24;