From 53d94f4c7142c496858f913f248cf5e1b685d50f Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 6 May 2016 16:44:49 +0100 Subject: 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. --- source/pdf/pdf-clean.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/pdf') 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 { -- cgit v1.2.3