pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jahew...@apache.org
Subject svn commit: r1618759 - /pdfbox/branches/no-awt/fontbox/src/main/java/org/apache/fontbox/cff/CFFParser.java
Date Mon, 18 Aug 2014 22:16:18 GMT
Author: jahewson
Date: Mon Aug 18 22:16:18 2014
New Revision: 1618759

URL: http://svn.apache.org/r1618759
Log:
PDFBOX-2262: Handle bad FDSelect indexes

Modified:
    pdfbox/branches/no-awt/fontbox/src/main/java/org/apache/fontbox/cff/CFFParser.java

Modified: pdfbox/branches/no-awt/fontbox/src/main/java/org/apache/fontbox/cff/CFFParser.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/no-awt/fontbox/src/main/java/org/apache/fontbox/cff/CFFParser.java?rev=1618759&r1=1618758&r2=1618759&view=diff
==============================================================================
--- pdfbox/branches/no-awt/fontbox/src/main/java/org/apache/fontbox/cff/CFFParser.java (original)
+++ pdfbox/branches/no-awt/fontbox/src/main/java/org/apache/fontbox/cff/CFFParser.java Mon
Aug 18 22:16:18 2014
@@ -887,7 +887,14 @@ public class CFFParser
         @Override
         public int getFDIndex(int gid)
         {
-            return fds[gid];
+            if (gid < fds.length)
+            {
+                return fds[gid];
+            }
+            else
+            {
+                return 0;
+            }
         }
 
         @Override



Mime
View raw message