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=62151

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912198 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
centic9 committed Sep 8, 2023
1 parent e686e84 commit f90415e
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 @@ -114,7 +114,7 @@ public CTTable getCTTable(){

@Override
public int getNumberOfColumns() {
return _table.getTblGrid().sizeOfGridColArray();
return _table.getTblGrid() == null ? 0 : _table.getTblGrid().sizeOfGridColArray();
}

@Override
Expand Down
Binary file not shown.
Binary file modified test-data/spreadsheet/stress.xls
Binary file not shown.

0 comments on commit f90415e

Please sign in to comment.