diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-06-27 18:04:57 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-06-27 18:06:29 +0100 |
commit | 50cc85d465a631c3bdbf204e6ab8bc7c97431eb6 (patch) | |
tree | 0cd37ad1641754f81e361b8ea0070231d0d9abd1 /fitz/filt_basic.c | |
parent | 69b926f318b8be17d72345eb32870946e9bd40a0 (diff) | |
download | mupdf-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/filt_basic.c')
-rw-r--r-- | fitz/filt_basic.c | 6 |
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; |