pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1839355 - /pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/CmapSubtable.java
Date Mon, 27 Aug 2018 17:35:32 GMT
Author: tilman
Date: Mon Aug 27 17:35:32 2018
New Revision: 1839355

URL: http://svn.apache.org/viewvc?rev=1839355&view=rev
Log:
PDFBOX-4299: apply modulo on negative number

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

Modified: pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/CmapSubtable.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/CmapSubtable.java?rev=1839355&r1=1839354&r2=1839355&view=diff
==============================================================================
--- pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/CmapSubtable.java (original)
+++ pdfbox/branches/2.0/fontbox/src/main/java/org/apache/fontbox/ttf/CmapSubtable.java Mon
Aug 27 17:35:32 2018
@@ -513,6 +513,10 @@ public class CmapSubtable implements Cma
                 if (p > 0)
                 {
                     p = (p + idDelta) % 65536;
+                    if (p < 0)
+                    {
+                        p = (p + 65536) % 65536;
+                    }
                 }
                 
                 if (p >= numGlyphs)



Mime
View raw message