pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1784579 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/color/SetColor.java
Date Mon, 27 Feb 2017 15:01:23 GMT
Author: tilman
Date: Mon Feb 27 15:01:23 2017
New Revision: 1784579

URL: http://svn.apache.org/viewvc?rev=1784579&view=rev
Log:
PDFBOX-3703: check argument size for all except for pattern colorspaces

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/color/SetColor.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/color/SetColor.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/color/SetColor.java?rev=1784579&r1=1784578&r2=1784579&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/color/SetColor.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/color/SetColor.java
Mon Feb 27 15:01:23 2017
@@ -26,7 +26,7 @@ import org.apache.pdfbox.contentstream.o
 
 import java.io.IOException;
 import java.util.List;
-import org.apache.pdfbox.pdmodel.graphics.color.PDDeviceColorSpace;
+import org.apache.pdfbox.pdmodel.graphics.color.PDPattern;
 
 /**
  * sc,scn,SC,SCN: Sets the color to use for stroking or non-stroking operations.
@@ -39,7 +39,7 @@ public abstract class SetColor extends O
     public void process(Operator operator, List<COSBase> arguments) throws IOException
     {
         PDColorSpace colorSpace = getColorSpace();
-        if (colorSpace instanceof PDDeviceColorSpace &&
+        if (!(colorSpace instanceof PDPattern) &&
             arguments.size() < colorSpace.getNumberOfComponents())
         {
             throw new MissingOperandException(operator, arguments);



Mime
View raw message