summaryrefslogtreecommitdiff
path: root/source/fitz/image.c
diff options
context:
space:
mode:
authorSimon Bünzli <zeniko@gmail.com>2013-09-25 15:34:57 +0200
committerRobin Watts <robin.watts@artifex.com>2014-01-01 13:00:21 +0000
commit833a583458eaaa5be744d8c2e6669e965960f60e (patch)
tree190bf6458270350f2fc34114b2c83be3fc38c043 /source/fitz/image.c
parent4964bd211911796b57459c1e4e4fe4d7be88051c (diff)
downloadmupdf-833a583458eaaa5be744d8c2e6669e965960f60e.tar.xz
tolerate inline images without EOF markers
This is required for e.g. 1980_-_compressed_inline_image.pdf and Bug690300.pdf .
Diffstat (limited to 'source/fitz/image.c')
-rw-r--r--source/fitz/image.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/source/fitz/image.c b/source/fitz/image.c
index bb1dc203..d6aadfbe 100644
--- a/source/fitz/image.c
+++ b/source/fitz/image.c
@@ -141,23 +141,6 @@ fz_decomp_image_from_stream(fz_context *ctx, fz_stream *stm, fz_image *image, in
len = fz_read(stm, samples, h * stride);
- /* Make sure we read the EOF marker (for inline images only) */
- if (in_line)
- {
- unsigned char tbuf[512];
- fz_try(ctx)
- {
- int tlen = fz_read(stm, tbuf, sizeof tbuf);
- if (tlen > 0)
- fz_warn(ctx, "ignoring garbage at end of image");
- }
- fz_catch(ctx)
- {
- fz_rethrow_if(ctx, FZ_ERROR_TRYLATER);
- fz_warn(ctx, "ignoring error at end of image");
- }
- }
-
/* Pad truncated images */
if (len < stride * h)
{