pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1844851 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java
Date Thu, 25 Oct 2018 17:36:29 GMT
Author: tilman
Date: Thu Oct 25 17:36:29 2018
New Revision: 1844851

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

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=1844851&r1=1844850&r2=1844851&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 Thu Oct 25
17:36:29 2018
@@ -1995,7 +1995,7 @@ public class COSParser extends BaseParse
                 }
                 int start = 0;
                 // skip spaces
-                while (numbersBytes[start] == 32)
+                while (start < numbersBytes.length && numbersBytes[start] == 32)
                 {
                     start++;
                 }



Mime
View raw message