From af0550ab30b7854622b48798b0eaac02d97106f3 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Sun, 26 Jul 2015 01:17:13 +0200 Subject: 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. --- source/pdf/pdf-repair.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source') 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) -- cgit v1.2.3