pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1862153 - /pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/util/autodetect/WindowsFontDirFinder.java
Date Wed, 26 Jun 2019 15:51:57 GMT
Author: tilman
Date: Wed Jun 26 15:51:56 2019
New Revision: 1862153

URL: http://svn.apache.org/viewvc?rev=1862153&view=rev
Log:
PDFBOX-4579: avoid IndexOutOfBoundsException, as suggested by Joakim Nilsson

Modified:
    pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/util/autodetect/WindowsFontDirFinder.java

Modified: pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/util/autodetect/WindowsFontDirFinder.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/util/autodetect/WindowsFontDirFinder.java?rev=1862153&r1=1862152&r2=1862153&view=diff
==============================================================================
--- pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/util/autodetect/WindowsFontDirFinder.java
(original)
+++ pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/util/autodetect/WindowsFontDirFinder.java
Wed Jun 26 15:51:56 2019
@@ -94,7 +94,7 @@ public class WindowsFontDirFinder implem
         }
         File osFontsDir;
         File psFontsDir;
-        if (windir != null)
+        if (windir != null && windir.length() > 2)
         {
             // remove any trailing '/'
             if (windir.endsWith("/"))



Mime
View raw message