You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2018/10/25 17:36:25 UTC

svn commit: r1844850 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java

Author: tilman
Date: Thu Oct 25 17:36:25 2018
New Revision: 1844850

URL: http://svn.apache.org/viewvc?rev=1844850&view=rev
Log:
PDFBOX-4361: avoid ArrayIndexOutOfBoundsException

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

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java?rev=1844850&r1=1844849&r2=1844850&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java Thu Oct 25 17:36:25 2018
@@ -2025,7 +2025,7 @@ public class COSParser extends BaseParse
                 }
                 int start = 0;
                 // skip spaces
-                while (numbersBytes[start] == 32)
+                while (start < numbersBytes.length && numbersBytes[start] == 32)
                 {
                     start++;
                 }