pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1656434 - /pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/action/GoToRemoteAction.java
Date Mon, 02 Feb 2015 10:07:44 GMT
Author: tilman
Date: Mon Feb  2 10:07:44 2015
New Revision: 1656434

URL: http://svn.apache.org/r1656434
Log:
PDFBOX-2652: avoid class cast exception if 2nd array element of destination is wrong

Modified:
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/action/GoToRemoteAction.java

Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/action/GoToRemoteAction.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/action/GoToRemoteAction.java?rev=1656434&r1=1656433&r2=1656434&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/action/GoToRemoteAction.java
(original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/action/GoToRemoteAction.java
Mon Feb  2 10:07:44 2015
@@ -100,6 +100,12 @@ public class GoToRemoteAction extends Go
                         "Destination array must have at least 2 elements"));
                 return false;
             }
+            if (!(ar.get(1) instanceof COSName))
+            {
+                context.addValidationError(new ValidationResult.ValidationError(ERROR_SYNTAX_DICT_INVALID,
+                        "Second element of destination array must be a name"));
+                return false;
+            }
             validateExplicitDestination(ar);
         }
         try



Mime
View raw message