pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1813684 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDAbstractContentStream.java
Date Sun, 29 Oct 2017 12:06:15 GMT
Author: tilman
Date: Sun Oct 29 12:06:14 2017
New Revision: 1813684

URL: http://svn.apache.org/viewvc?rev=1813684&view=rev
Log:
PDFBOX-3983: don't a allow a miter limit <= 0, as suggested by Emmeran Seehuber

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDAbstractContentStream.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDAbstractContentStream.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDAbstractContentStream.java?rev=1813684&r1=1813683&r2=1813684&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDAbstractContentStream.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDAbstractContentStream.java
Sun Oct 29 12:06:14 2017
@@ -1295,6 +1295,10 @@ public abstract class PDAbstractContentS
         {
             throw new IllegalStateException("Error: setMiterLimit is not allowed within a
text block.");
         }
+        if (miterLimit <= 0.0)
+        {
+            throw new IllegalArgumentException("A miter limit <= 0 is invalid and will
not render in Acrobat Reader");
+        }
         writeOperand(miterLimit);
         writeOperator("M");
     }



Mime
View raw message