summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-11-08 16:46:51 +0100
committerTor Andersson <tor.andersson@artifex.com>2018-11-08 16:46:51 +0100
commit8796a6088b64659eb7eb32fcf0fe9bd9a7673110 (patch)
treea30d6e8e2993b616105256aa75ef5ff343047610
parentf744b7de7c781ee5d347d3562b954e592309a06a (diff)
downloadmupdf-8796a6088b64659eb7eb32fcf0fe9bd9a7673110.tar.xz
Fix 699343: Skip spaces before data in DCTDecode filter.
-rw-r--r--source/fitz/filter-dct.c4
1 files 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;