diff options
author | PJ Fanning <fanningpj@apache.org> | 2018-12-08 08:13:36 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2018-12-08 08:13:36 +0000 |
commit | 740a756a3f28280e450f97525fd44d79eb9103e5 (patch) | |
tree | 55a41537ab77a9a3d36cc3babb10e4bd4c9a31cf /src/java/org/apache/poi/util | |
parent | ef75a6d2d2dda6ab20366954bd19e3e492bc5dc2 (diff) | |
download | poi-740a756a3f28280e450f97525fd44d79eb9103e5.tar.gz poi-740a756a3f28280e450f97525fd44d79eb9103e5.zip |
lgtm issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1848438 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/util')
-rw-r--r-- | src/java/org/apache/poi/util/StringUtil.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/java/org/apache/poi/util/StringUtil.java b/src/java/org/apache/poi/util/StringUtil.java index 302e532570..2017abf125 100644 --- a/src/java/org/apache/poi/util/StringUtil.java +++ b/src/java/org/apache/poi/util/StringUtil.java @@ -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 = "?"; |