pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1810209 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java
Date Sat, 30 Sep 2017 14:33:58 GMT
Author: tilman
Date: Sat Sep 30 14:33:58 2017
New Revision: 1810209

URL: http://svn.apache.org/viewvc?rev=1810209&view=rev
Log:
PDFBOX-3923, PDFBOX-3935: remove code that is no longer needed, due to the change in checkXrefOffsets()

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=1810209&r1=1810208&r2=1810209&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 Sat Sep 30
14:33:58 2017
@@ -2215,7 +2215,6 @@ public class COSParser extends BaseParse
      */
     protected boolean parseXrefTable(long startByteOffset) throws IOException
     {
-        long xrefTableStartOffset = source.getPosition();
         if(source.peek() != 'x')
         {
             return false;
@@ -2281,22 +2280,9 @@ public class COSParser extends BaseParse
                     try
                     {
                         long currOffset = Long.parseLong(splitString[0]);
-                        if (currOffset >= xrefTableStartOffset && currOffset <=
source.getPosition())
-                        {
-                            // PDFBOX-3923: offset points inside this table - that can't
be good
-                            // PDFBOX-3935: don't abort (rebuilding trailer would lose encryption

-                            //              dictionary), just skip
-                            // alternative fix: in checkXrefOffsets() do clear() before putAll()
-                            LOG.warn("XRefTable offset " + currOffset + 
-                                    " is within xref table (start offset: " + xrefTableStartOffset
+ 
-                                    ") for object " + currObjID);
-                        }
-                        else
-                        {
-                            int currGenID = Integer.parseInt(splitString[1]);
-                            COSObjectKey objKey = new COSObjectKey(currObjID, currGenID);
-                            xrefTrailerResolver.setXRef(objKey, currOffset);
-                        }
+                        int currGenID = Integer.parseInt(splitString[1]);
+                        COSObjectKey objKey = new COSObjectKey(currObjID, currGenID);
+                        xrefTrailerResolver.setXRef(objKey, currOffset);
                     }
                     catch(NumberFormatException e)
                     {



Mime
View raw message