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 2020/05/11 06:26:59 UTC

svn commit: r1877562 - /pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java

Author: tilman
Date: Mon May 11 06:26:59 2020
New Revision: 1877562

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

Modified:
    pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java

Modified: pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java?rev=1877562&r1=1877561&r2=1877562&view=diff
==============================================================================
--- pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java (original)
+++ pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java Mon May 11 06:26:59 2020
@@ -415,9 +415,9 @@ public class GlyphSubstitutionTable exte
             }
             for (int featureIndex : langSysTable.featureIndices)
             {
-                if (enabledFeatures == null || 
-                        featureIndex < featureList.length && 
-                        enabledFeatures.contains(featureList[featureIndex].featureTag))
+                if (featureIndex < featureList.length &&
+                        (enabledFeatures == null ||
+                         enabledFeatures.contains(featureList[featureIndex].featureTag)))
                 {
                     result.add(featureList[featureIndex]);
                 }