pdfbox-commits mailing list archives

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

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

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

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



Mime
View raw message