pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1844505 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java
Date Sun, 21 Oct 2018 17:23:20 GMT
Author: tilman
Date: Sun Oct 21 17:23:20 2018
New Revision: 1844505

URL: http://svn.apache.org/viewvc?rev=1844505&view=rev
Log:
PDFBOX-4357: /Pages must be a dictionary

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java?rev=1844505&r1=1844504&r2=1844505&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java Sun Oct 21
17:23:20 2018
@@ -2291,9 +2291,9 @@ public class COSParser extends BaseParse
                 checkPagesDictionary((COSDictionary) pages, new HashSet<COSObject>());
             }
         }
-        if (root.getDictionaryObject(COSName.PAGES) == null)
+        if (!(root.getDictionaryObject(COSName.PAGES) instanceof COSDictionary))
         {
-            throw new IOException("Page tree root is null");
+            throw new IOException("Page tree root must be a dictionary");
         }
     }
 



Mime
View raw message