From 833a583458eaaa5be744d8c2e6669e965960f60e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=C3=BCnzli?= Date: Wed, 25 Sep 2013 15:34:57 +0200 Subject: tolerate inline images without EOF markers This is required for e.g. 1980_-_compressed_inline_image.pdf and Bug690300.pdf . --- source/fitz/image.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'source') 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) { -- cgit v1.2.3