pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1824693 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriter.java
Date Sun, 18 Feb 2018 19:38:44 GMT
Author: msahyoun
Date: Sun Feb 18 19:38:44 2018
New Revision: 1824693

URL: http://svn.apache.org/viewvc?rev=1824693&view=rev
Log:
PDFBOX-4071: avoid potential NPE

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriter.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriter.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriter.java?rev=1824693&r1=1824692&r2=1824693&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriter.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriter.java Sun Feb 18
19:38:44 2018
@@ -1330,6 +1330,10 @@ public class COSWriter implements ICOSVi
                 missingID = false;
             }
         }
+        else
+        {
+            idArray = new COSArray();
+        }
         // check for an existing documentID
         if (idArray != null && idArray.size() == 2)
         {



Mime
View raw message