pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1867725 - in /pdfbox/trunk: ./ fontbox/src/main/java/org/apache/fontbox/cmap/CMapParser.java
Date Sun, 29 Sep 2019 15:11:37 GMT
Author: lehmi
Date: Sun Sep 29 15:11:37 2019
New Revision: 1867725

URL: http://svn.apache.org/viewvc?rev=1867725&view=rev
Log:
PDFBOX-4661: support a maximum of 256 values to be more lenient

Modified:
    pdfbox/trunk/   (props changed)
    pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cmap/CMapParser.java

Propchange: pdfbox/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Sep 29 15:11:37 2019
@@ -1,4 +1,4 @@
-/pdfbox/branches/2.0:1760418,1761484,1762133,1763609,1779822,1780783,1780789,1782684,1784450,1792784,1795704,1795712,1799081-1799082,1814046,1814285,1814459,1824914,1825811,1825820,1825912,1844477,1844516,1844519,1844567,1850577,1857953,1858696,1858698,1860825
+/pdfbox/branches/2.0:1760418,1761484,1762133,1763609,1779822,1780783,1780789,1782684,1784450,1792784,1795704,1795712,1799081-1799082,1814046,1814285,1814459,1824914,1825811,1825820,1825912,1844477,1844516,1844519,1844567,1850577,1857953,1858696,1858698,1860825,1867724
 /pdfbox/branches/issue4569:1861285,1861586
 /pdfbox/branches/no-awt:1618517-1621410
 /pdfbox/no-awt:1618514-1618516

Modified: pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cmap/CMapParser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cmap/CMapParser.java?rev=1867725&r1=1867724&r2=1867725&view=diff
==============================================================================
--- pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cmap/CMapParser.java (original)
+++ pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cmap/CMapParser.java Sun Sep 29
15:11:37 2019
@@ -378,7 +378,8 @@ public class CMapParser
             else if (nextToken instanceof byte[])
             {
                 // the range can not represent more that 255 values
-                if ((end - start) > 255)
+                // PDFBOX-4661: be more lenient and support 256 values as well
+                if ((end - start) > 256)
                 {
                     // PDFBOX-4550: likely corrupt stream
                     break;



Mime
View raw message