Skip to content

Commit

Permalink
Bug 66425: Avoid exceptions found via poi-fuzz
Browse files Browse the repository at this point in the history
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
  • Loading branch information
centic9 committed Apr 17, 2024
1 parent 059595f commit 51637fc
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public void endElement(String uri, String localName, String name)
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);
}
Expand Down
Binary file not shown.
Binary file modified test-data/spreadsheet/stress.xls
Binary file not shown.

0 comments on commit 51637fc

Please sign in to comment.