pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1844507 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXrefStreamParser.java
Date Sun, 21 Oct 2018 17:45:24 GMT
Author: tilman
Date: Sun Oct 21 17:45:24 2018
New Revision: 1844507

URL: http://svn.apache.org/viewvc?rev=1844507&view=rev
Log:
PDFBOX-4347: don't set -1 if value is missing, this can result in an ArrayIndexOutOfBoundsException

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXrefStreamParser.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXrefStreamParser.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXrefStreamParser.java?rev=1844507&r1=1844506&r2=1844507&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXrefStreamParser.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXrefStreamParser.java
Sun Oct 21 17:45:24 2018
@@ -119,9 +119,9 @@ public class PDFXrefStreamParser extends
         /*
          * Calculating the size of the line in bytes
          */
-        int w0 = xrefFormat.getInt(0);
-        int w1 = xrefFormat.getInt(1);
-        int w2 = xrefFormat.getInt(2);
+        int w0 = xrefFormat.getInt(0, 0);
+        int w1 = xrefFormat.getInt(1, 0);
+        int w2 = xrefFormat.getInt(2, 0);
         int lineSize = w0 + w1 + w2;
 
         while(!seqSource.isEOF() && objIter.hasNext())



Mime
View raw message