summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2018-02-12 17:35:35 +0100
committerSebastian Rasmussen <sebras@gmail.com>2018-02-12 17:46:28 +0100
commit21106086d1e122049d75e25a0e2a68747f4b6655 (patch)
treee9d38d4bb000026b49a535c3b3fdd9890c4f81b2
parentaf27c82bde5dcdea4d0d225f29da0f0409ca2c75 (diff)
downloadmupdf-21106086d1e122049d75e25a0e2a68747f4b6655.tar.xz
jbig2 globals are streams, this implies indirect references.
Previously mupdf would attempt to load any indirect reference, whether it was a stream or not.
-rw-r--r--source/pdf/pdf-stream.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/pdf/pdf-stream.c b/source/pdf/pdf-stream.c
index 15014b38..f5a3c99b 100644
--- a/source/pdf/pdf-stream.c
+++ b/source/pdf/pdf-stream.c
@@ -200,7 +200,9 @@ build_filter(fz_context *ctx, fz_stream *chain, pdf_document *doc, pdf_obj *f, p
{
fz_jbig2_globals *globals = NULL;
pdf_obj *obj = pdf_dict_get(ctx, p, PDF_NAME_JBIG2Globals);
- if (pdf_is_indirect(ctx, obj))
+ if (!pdf_is_stream(ctx, obj))
+ fz_warn(ctx, "jbig2 globals is not a stream, skipping globals");
+ else
globals = pdf_load_jbig2_globals(ctx, doc, obj);
tmp = chain;
chain = NULL;