You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ce...@apache.org on 2026/10/21 09:57:57 UTC
(poi) 01/02: Avoid NPE found by fuzzing
This is an automated email from the ASF dual-hosted git repository.
centic9 pushed a commit to branch adjust_fuzzing_and_avoid_npe
in repository https://gitbox.apache.org/repos/asf/poi.git
commit 1b71d3a4a99168762a3bdfa1c9f1e5bfa5ca4c14
Author: Dominik Stadler <do...@dynatrace.com>
AuthorDate: Wed Oct 21 08:52:50 2026 +0200
Avoid NPE found by fuzzing
---
.../main/java/org/apache/poi/hssf/model/InternalSheet.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/poi/src/main/java/org/apache/poi/hssf/model/InternalSheet.java b/poi/src/main/java/org/apache/poi/hssf/model/InternalSheet.java
index 2098360aae..9b0dbac2ce 100644
--- a/poi/src/main/java/org/apache/poi/hssf/model/InternalSheet.java
+++ b/poi/src/main/java/org/apache/poi/hssf/model/InternalSheet.java
@@ -446,7 +446,8 @@ public final class InternalSheet {
_rowsAggregate = new RowRecordsAggregate();
records.add(_rowsAggregate);
// 'Sheet View Settings'
- records.add(windowTwo = createWindowTwo());
+ windowTwo = createWindowTwo();
+ records.add(windowTwo);
_selection = createSelection();
records.add(_selection);
@@ -1023,10 +1024,13 @@ public final class InternalSheet {
* index of the default ExtendedFormatRecord (0xF)
*/
public short getXFIndexForColAt(short columnIndex) {
- ColumnInfoRecord ci = _columnInfos.findColumnInfo(columnIndex);
- if (ci != null) {
- return (short)ci.getXFIndex();
+ if (_columnInfos != null) {
+ ColumnInfoRecord ci = _columnInfos.findColumnInfo(columnIndex);
+ if (ci != null) {
+ return (short) ci.getXFIndex();
+ }
}
+
return 0xF;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org