From 8796a6088b64659eb7eb32fcf0fe9bd9a7673110 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 8 Nov 2018 16:46:51 +0100 Subject: Fix 699343: Skip spaces before data in DCTDecode filter. --- source/fitz/filter-dct.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/fitz/filter-dct.c b/source/fitz/filter-dct.c index c3654cf8..e05b727d 100644 --- a/source/fitz/filter-dct.c +++ b/source/fitz/filter-dct.c @@ -182,8 +182,8 @@ next_dctd(fz_context *ctx, fz_stream *stm, size_t max) jpeg_create_decompress(cinfo); state->init = 1; - /* Skip over any stray returns at the start of the stream */ - while ((c = fz_peek_byte(ctx, state->chain)) == '\n' || c == '\r') + /* Skip over any stray whitespace at the start of the stream */ + while ((c = fz_peek_byte(ctx, state->chain)) == '\n' || c == '\r' || c == ' ') (void)fz_read_byte(ctx, state->chain); cinfo->src = &state->srcmgr; -- cgit v1.2.3