[poppler] poppler/PDFDoc.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Mar 15 22:05:27 UTC 2022


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

New commits:
commit 98a2253cb56a73a8b9658ae4e1fb06430feed7f2
Author: Albert Astals Cid <aacid at kde.org>
Date:   Tue Mar 15 22:58:59 2022 +0100

    Limit complaining about missing ID for encrypted files
    
    Fixes #1228

diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
index 3855e98f..6580fc1f 100644
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -1541,7 +1541,9 @@ Object PDFDoc::createTrailerDict(int uxrefSize, bool incrUpdate, Goffset startxR
         // only update the second part of the array
         Object obj4 = xRef->getTrailerDict()->getDict()->lookup("ID");
         if (!obj4.isArray()) {
-            error(errSyntaxWarning, -1, "PDFDoc::createTrailerDict original file's ID entry isn't an array. Trying to continue");
+            if (hasEncrypt) {
+                error(errSyntaxWarning, -1, "PDFDoc::createTrailerDict original file's ID entry isn't an array. Trying to continue");
+            }
         } else {
             Array *array = new Array(xRef);
             // Get the first part of the ID


More information about the poppler mailing list