From 55c3f68d638ac1263a386e0aaa004bb6e8bde731 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Mon, 11 Dec 2017 14:09:15 +0100 Subject: Bugs 698804/698810/698811: Keep PDF object numbers below limit. This ensures that: * xref tables with objects pointers do not grow out of bounds. * other readers, e.g. Adobe Acrobat can parse PDFs written by mupdf. --- include/mupdf/pdf/object.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/mupdf/pdf/object.h b/include/mupdf/pdf/object.h index 21ed8595..4177112b 100644 --- a/include/mupdf/pdf/object.h +++ b/include/mupdf/pdf/object.h @@ -3,6 +3,9 @@ typedef struct pdf_document_s pdf_document; +/* Defined in PDF 1.7 according to Acrobat limit. */ +#define PDF_MAX_OBJECT_NUMBER 8388607 + /* * Dynamic objects. * The same type of objects as found in PDF and PostScript. -- cgit v1.2.3