summaryrefslogtreecommitdiff
path: root/source/pdf
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2015-03-31 19:42:57 +0100
committerRobin Watts <robin.watts@artifex.com>2015-04-01 11:01:03 +0100
commit485058dbc22c2b181bd044bae9721224f016d568 (patch)
treeef3b92732e62c13a46bd3b87a83f1cc5b9e1aec2 /source/pdf
parentd16ad89284cab160dd527f67e45142b146a6b99e (diff)
downloadmupdf-485058dbc22c2b181bd044bae9721224f016d568.tar.xz
Bug 693719: Improve repairing of files with broken trailers.
When repairing a file we keep track of the most recent 'Root' entry we have found. Only accept a new Root entry as a replacement if it is a dictionary.
Diffstat (limited to 'source/pdf')
-rw-r--r--source/pdf/pdf-repair.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/pdf/pdf-repair.c b/source/pdf/pdf-repair.c
index 3c149177..8881c50f 100644
--- a/source/pdf/pdf-repair.c
+++ b/source/pdf/pdf-repair.c
@@ -418,7 +418,7 @@ pdf_repair_xref(fz_context *ctx, pdf_document *doc)
}
obj = pdf_dict_get(ctx, dict, PDF_NAME_Root);
- if (obj)
+ if (pdf_is_dict(ctx, obj))
{
pdf_drop_obj(ctx, root);
root = pdf_keep_obj(ctx, obj);