pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1857202 - /pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java
Date Tue, 09 Apr 2019 13:48:40 GMT
Author: tilman
Date: Tue Apr  9 13:48:40 2019
New Revision: 1857202

URL: http://svn.apache.org/viewvc?rev=1857202&view=rev
Log:
PDFBOX-4489: check order of LangSysTag in the hope to detect corrupt table

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

Modified: pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java?rev=1857202&r1=1857201&r2=1857202&view=diff
==============================================================================
--- pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java
(original)
+++ pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java
Tue Apr  9 13:48:40 2019
@@ -145,7 +145,7 @@ public class GlyphSubstitutionTable exte
         for (int i = 0; i < langSysCount; i++)
         {
             langSysTags[i] = data.readString(4);
-            if (i > 0 && langSysTags[i].compareTo(langSysTags[i-1]) < 0)
+            if (i > 0 && langSysTags[i].compareTo(langSysTags[i-1]) <= 0)
             {
                 // PDFBOX-4489: catch corrupt file
                 // https://docs.microsoft.com/en-us/typography/opentype/spec/chapter2#slTbl_sRec



Mime
View raw message