poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fannin...@apache.org
Subject svn commit: r1848438 - in /poi/trunk/src: java/org/apache/poi/ss/formula/functions/MatrixFunction.java java/org/apache/poi/util/StringUtil.java ooxml/java/org/apache/poi/ooxml/util/POIXMLConstants.java
Date Sat, 08 Dec 2018 08:13:36 GMT
Author: fanningpj
Date: Sat Dec  8 08:13:36 2018
New Revision: 1848438

URL: http://svn.apache.org/viewvc?rev=1848438&view=rev
Log:
lgtm issues

Modified:
    poi/trunk/src/java/org/apache/poi/ss/formula/functions/MatrixFunction.java
    poi/trunk/src/java/org/apache/poi/util/StringUtil.java
    poi/trunk/src/ooxml/java/org/apache/poi/ooxml/util/POIXMLConstants.java

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/functions/MatrixFunction.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/MatrixFunction.java?rev=1848438&r1=1848437&r2=1848438&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/MatrixFunction.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/MatrixFunction.java Sat Dec  8
08:13:36 2018
@@ -63,7 +63,7 @@ public abstract class MatrixFunction imp
                     i = 0;
                     j++;
                 }
-                matrix[j][i++] = aVector;
+                if (j < matrix.length) matrix[j][i++] = aVector;
             }
         }
         

Modified: poi/trunk/src/java/org/apache/poi/util/StringUtil.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/util/StringUtil.java?rev=1848438&r1=1848437&r2=1848438&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/util/StringUtil.java (original)
+++ poi/trunk/src/java/org/apache/poi/util/StringUtil.java Sat Dec  8 08:13:36 2018
@@ -698,7 +698,7 @@ public class StringUtil {
         final String prefix;
 
         // #61881 - for now we only check the first char
-        if (len > 0 && string[offset] == 0 && string[offset+1] == 0) {
+        if (len > 0 && offset < (string.length - 1) && string[offset]
== 0 && string[offset+1] == 0) {
             newOffset = offset+2;
             prefix = "?";
 

Modified: poi/trunk/src/ooxml/java/org/apache/poi/ooxml/util/POIXMLConstants.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/ooxml/util/POIXMLConstants.java?rev=1848438&r1=1848437&r2=1848438&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/ooxml/util/POIXMLConstants.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/ooxml/util/POIXMLConstants.java Sat Dec  8 08:13:36
2018
@@ -20,6 +20,7 @@ package org.apache.poi.ooxml.util;
 public class POIXMLConstants {
     public static final String FEATURE_LOAD_DTD_GRAMMAR = "http://apache.org/xml/features/nonvalidating/load-dtd-grammar";
     public static final String FEATURE_LOAD_EXTERNAL_DTD = "http://apache.org/xml/features/nonvalidating/load-external-dtd";
+    public static final String FEATURE_DISALLOW_DOCTYPE_DECL = "http://apache.org/xml/features/disallow-doctype-decl";
     public static final String PROPERTY_ENTITY_EXPANSION_LIMIT = "http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit";
     public static final String PROPERTY_SECURITY_MANAGER = "http://apache.org/xml/properties/security-manager";
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message