pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1864640 - /pdfbox/branches/1.8/fontbox/src/main/java/org/apache/fontbox/ttf/PostScriptTable.java
Date Wed, 07 Aug 2019 16:27:38 GMT
Author: tilman
Date: Wed Aug  7 16:27:38 2019
New Revision: 1864640

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

Modified:
    pdfbox/branches/1.8/fontbox/src/main/java/org/apache/fontbox/ttf/PostScriptTable.java

Modified: pdfbox/branches/1.8/fontbox/src/main/java/org/apache/fontbox/ttf/PostScriptTable.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/fontbox/src/main/java/org/apache/fontbox/ttf/PostScriptTable.java?rev=1864640&r1=1864639&r2=1864640&view=diff
==============================================================================
--- pdfbox/branches/1.8/fontbox/src/main/java/org/apache/fontbox/ttf/PostScriptTable.java
(original)
+++ pdfbox/branches/1.8/fontbox/src/main/java/org/apache/fontbox/ttf/PostScriptTable.java
Wed Aug  7 16:27:38 2019
@@ -101,7 +101,7 @@ public class PostScriptTable extends TTF
             for (int i = 0; i < numGlyphs; i++)
             {
                 int index = glyphNameIndex[i];
-                if (index < Encoding.NUMBER_OF_MAC_GLYPHS)
+                if (index >= 0 && index < Encoding.NUMBER_OF_MAC_GLYPHS)
                 {
                     glyphNames[i] = Encoding.MAC_GLYPH_NAMES[index];
                 }



Mime
View raw message