summaryrefslogtreecommitdiff
path: root/source/pdf
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-05-06 16:44:49 +0100
committerRobin Watts <robin.watts@artifex.com>2016-05-06 16:46:09 +0100
commit53d94f4c7142c496858f913f248cf5e1b685d50f (patch)
tree7d87fce046d63237e5035795253a6f28c15e8949 /source/pdf
parentf24fd137b0dc7f79b9e7c42ead0d8921b52a58b8 (diff)
downloadmupdf-53d94f4c7142c496858f913f248cf5e1b685d50f.tar.xz
Mutool clean: Fix sanitisation of pages with Content arrays.
If the Contents of a page are an array, we were forgetting to write the new singleton replacement into the dictionary.
Diffstat (limited to 'source/pdf')
-rw-r--r--source/pdf/pdf-clean.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/pdf/pdf-clean.c b/source/pdf/pdf-clean.c
index 49db6bc3..d09cc4f7 100644
--- a/source/pdf/pdf-clean.c
+++ b/source/pdf/pdf-clean.c
@@ -164,6 +164,7 @@ void pdf_clean_page_contents(fz_context *ctx, pdf_document *doc, pdf_page *page,
new_ref = pdf_add_object(ctx, doc, new_obj);
pdf_drop_obj(ctx, page->contents);
page->contents = contents = pdf_keep_obj(ctx, new_ref);
+ pdf_dict_put(ctx, page->me, PDF_NAME_Contents, contents);
}
else
{