Bug 66425: Avoid a NullPointerException found via oss-fuzz

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
This commit is contained in:
Dominik Stadler 2023-09-08 16:02:06 +00:00
parent e686e84512
commit f90415ef0e
3 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ public class XSLFTable extends XSLFGraphicFrame implements Iterable<XSLFTableRow
@Override
public int getNumberOfColumns() {
return _table.getTblGrid().sizeOfGridColArray();
return _table.getTblGrid() == null ? 0 : _table.getTblGrid().sizeOfGridColArray();
}
@Override

Binary file not shown.