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 2019/04/09 13:49:10 UTC

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

Author: tilman
Date: Tue Apr  9 13:49:10 2019
New Revision: 1857204

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

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

Modified: pdfbox/branches/issue45/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue45/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java?rev=1857204&r1=1857203&r2=1857204&view=diff
==============================================================================
--- pdfbox/branches/issue45/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java (original)
+++ pdfbox/branches/issue45/fontbox/src/main/java/org/apache/fontbox/ttf/GlyphSubstitutionTable.java Tue Apr  9 13:49:10 2019
@@ -118,7 +118,7 @@ public class GlyphSubstitutionTable exte
         {
             LangSysRecord langSysRecord = new LangSysRecord();
             langSysRecord.langSysTag = data.readString(4);
-            if (i > 0 && langSysRecord.langSysTag.compareTo(prevLangSysTag) < 0)
+            if (i > 0 && langSysRecord.langSysTag.compareTo(prevLangSysTag) <= 0)
             {
                 // PDFBOX-4489: catch corrupt file
                 // https://docs.microsoft.com/en-us/typography/opentype/spec/chapter2#slTbl_sRec