Skip to content

Commit

Permalink
Bug 66425: Avoid a NullPointerException found via oss-fuzz
Browse files Browse the repository at this point in the history
We try to avoid throwing NullPointerException, but it was possible
to trigger one here with a specially crafted input-file

Should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62059

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912127 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
centic9 committed Sep 6, 2023
1 parent 04ae3b4 commit b801711
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ public XSSFTableStyle(int index, CTDxfs dxfs, CTTableStyle tableStyle, IndexedCo
}

for (CTTableStyleElement element : tableStyle.getTableStyleElementList()) {
if (element.getType() == null) {
throw new IllegalArgumentException("Did not have a type in table-style " + element);
}
TableStyleType type = TableStyleType.valueOf(element.getType().toString());
DifferentialStyleProvider dstyle = null;
if (element.isSetDxfId()) {
Expand Down
Binary file not shown.
Binary file modified test-data/spreadsheet/stress.xls
Binary file not shown.

0 comments on commit b801711

Please sign in to comment.