summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2015-07-26 01:17:13 +0200
committerSebastian Rasmussen <sebras@gmail.com>2015-07-27 14:54:26 +0200
commitaf0550ab30b7854622b48798b0eaac02d97106f3 (patch)
treefc739c5334db54cf3526d499d8f0003d837b5f64 /source
parent9148cbdc6649ded26c21f82336ec8e693cea5155 (diff)
downloadmupdf-af0550ab30b7854622b48798b0eaac02d97106f3.tar.xz
Do not attempt to resolve indirect objects during pdf repair
When parsing dicts or arrays while reparing objects the xref should not be used to try to resolve indirect objects since the xref has not been fully rebuilt yet. As was the case prior to commit 07dd854.
Diffstat (limited to 'source')
-rw-r--r--source/pdf/pdf-repair.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/pdf/pdf-repair.c b/source/pdf/pdf-repair.c
index 65077637..0f20d3f2 100644
--- a/source/pdf/pdf-repair.c
+++ b/source/pdf/pdf-repair.c
@@ -40,7 +40,7 @@ pdf_repair_obj(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf, fz_off_t *st
/* Send NULL xref so we don't try to resolve references */
fz_try(ctx)
{
- dict = pdf_parse_dict(ctx, doc, file, buf);
+ dict = pdf_parse_dict(ctx, NULL, file, buf);
}
fz_catch(ctx)
{
@@ -49,7 +49,7 @@ pdf_repair_obj(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf, fz_off_t *st
if (file->eof)
fz_rethrow_message(ctx, "broken object at EOF ignored");
/* Silently swallow the error */
- dict = pdf_new_dict(ctx, doc, 2);
+ dict = pdf_new_dict(ctx, NULL, 2);
}
if (encrypt && id)