Author: tilman Date: Tue Aug 18 16:17:20 2015 New Revision: 1696450 URL: http://svn.apache.org/r1696450 Log: PDFBOX-2936: avoid orphan /CF dictionaries found in US govt "I-" files
Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java?rev=1696450&r1=1696449&r2=1696450&view=diff ============================================================================== --- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java (original) +++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java Tue Aug 18 16:17:20 2015 @@ -1519,12 +1519,17 @@ public class NonSequentialPDFParser exte /** * * @param dict the dictionary to be decrypted - * @param the object number + * @param objNr the object number * @param objGenNr the object generation number * @throws IOException ff something went wrong */ protected final void decryptDictionary(COSDictionary dict, long objNr, long objGenNr) throws IOException { + if (dict.getItem(COSName.CF) != null) + { + // PDFBOX-2936: avoid orphan /CF dictionaries found in US govt "I-" files + return; + } // skip dictionary containing the signature if (!COSName.SIG.equals(dict.getItem(COSName.TYPE))) {