diff options
author | Dominik Stadler <centic@apache.org> | 2024-04-17 18:15:33 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2024-04-17 18:15:33 +0000 |
commit | 51637fcc435f1a65edd08f30df1d71824b95843c (patch) | |
tree | 3a679dda1562150307122d41a4968c1d2dadd8c5 /poi-examples | |
parent | 059595f0211a229d98af47da41efa0ebfa16954c (diff) | |
download | poi-51637fcc435f1a65edd08f30df1d71824b95843c.tar.gz poi-51637fcc435f1a65edd08f30df1d71824b95843c.zip |
Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a few NullPointerException
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66400
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917068 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-examples')
-rw-r--r-- | poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java index 14d5fbd9e8..fbe4f58822 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java @@ -136,7 +136,7 @@ public class FromHowTo { if(nextIsString && StringUtil.isNotBlank(lastContents)) { Integer idx = Integer.valueOf(lastContents); lastContents = lruCache.get(idx); - if (lastContents == null && !lruCache.containsKey(idx)) { + if (lastContents == null && !lruCache.containsKey(idx) && sst != null) { lastContents = sst.getItemAt(idx).getString(); lruCache.put(idx, lastContents); } |