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
This commit is contained in:
Dominik Stadler 2024-04-17 18:15:33 +00:00
parent 059595f021
commit 51637fcc43
3 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ public class FromHowTo {
if(nextIsString && StringUtil.isNotBlank(lastContents)) { if(nextIsString && StringUtil.isNotBlank(lastContents)) {
Integer idx = Integer.valueOf(lastContents); Integer idx = Integer.valueOf(lastContents);
lastContents = lruCache.get(idx); lastContents = lruCache.get(idx);
if (lastContents == null && !lruCache.containsKey(idx)) { if (lastContents == null && !lruCache.containsKey(idx) && sst != null) {
lastContents = sst.getItemAt(idx).getString(); lastContents = sst.getItemAt(idx).getString();
lruCache.put(idx, lastContents); lruCache.put(idx, lastContents);
} }

Binary file not shown.