Author: centic
Date: Wed Apr 17 18:15:33 2024
New Revision: 1917068

URL: http://svn.apache.org/viewvc?rev=1917068&view=rev
Log:
Bug 66425: Avoid exceptions found via poi-fuzz

Prevent a few NullPointerException

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66400

Added:
    
poi/trunk/test-data/spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-5089447305609216.xlsx
Modified:
    
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java
    poi/trunk/test-data/spreadsheet/stress.xls

Modified: 
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java?rev=1917068&r1=1917067&r2=1917068&view=diff
==============================================================================
--- 
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java
 (original)
+++ 
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java
 Wed Apr 17 18:15:33 2024
@@ -136,7 +136,7 @@ public class FromHowTo {
             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);
                 }

Added: 
poi/trunk/test-data/spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-5089447305609216.xlsx
URL: 
http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-5089447305609216.xlsx?rev=1917068&view=auto
==============================================================================
Binary files 
poi/trunk/test-data/spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-5089447305609216.xlsx
 (added) and 
poi/trunk/test-data/spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-5089447305609216.xlsx
 Wed Apr 17 18:15:33 2024 differ

Modified: poi/trunk/test-data/spreadsheet/stress.xls
URL: 
http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/stress.xls?rev=1917068&r1=1917067&r2=1917068&view=diff
==============================================================================
Binary files - no diff available.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org

Reply via email to