[poppler] poppler/PDFDoc.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jul 27 23:06:32 UTC 2022


 poppler/PDFDoc.cc |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit dcd5bd8238ea448addd102ff045badd0aca1b990
Author: crt <chluo at cse.cuhk.edu.hk>
Date:   Wed Jul 27 08:40:02 2022 +0000

    pdfseparate: Check XRef's Catalog for being a Dict

diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
index 351140af..c26a41c4 100644
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -886,6 +886,10 @@ int PDFDoc::savePageAs(const GooString &name, int pageNo)
 
     // get and mark output intents etc.
     Object catObj = getXRef()->getCatalog();
+    if (!catObj.isDict()) {
+        error(errSyntaxError, -1, "XRef's Catelog is not a dictionary");
+        return errOpenFile;
+    }
     Dict *catDict = catObj.getDict();
     Object pagesObj = catDict->lookup("Pages");
     Object afObj = catDict->lookupNF("AcroForm").copy();


More information about the poppler mailing list