aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLRelation.java3
-rw-r--r--test-data/spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-6448258963341312.xlsxbin0 -> 6874 bytes
-rw-r--r--test-data/spreadsheet/stress.xlsbin67584 -> 68096 bytes
3 files changed, 3 insertions, 0 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLRelation.java b/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLRelation.java
index 5bf576d4e0..e4f6e08ef7 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLRelation.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLRelation.java
@@ -205,6 +205,9 @@ public abstract class POIXMLRelation {
PackageRelationship rel = it.next();
PackagePartName relName = PackagingURIHelper.createPartName(rel.getTargetURI());
PackagePart part = corePart.getPackage().getPart(relName);
+ if (part == null) {
+ throw new IllegalArgumentException("Could not read part " + relName + " from " + corePart);
+ }
return part.getInputStream();
}
LOGGER.atWarn().log("No part {} found", getDefaultFileName());
diff --git a/test-data/spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-6448258963341312.xlsx b/test-data/spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-6448258963341312.xlsx
new file mode 100644
index 0000000000..0707db6706
--- /dev/null
+++ b/test-data/spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-6448258963341312.xlsx
Binary files differ
diff --git a/test-data/spreadsheet/stress.xls b/test-data/spreadsheet/stress.xls
index ee43072f5c..a47f99b2cb 100644
--- a/test-data/spreadsheet/stress.xls
+++ b/test-data/spreadsheet/stress.xls
Binary files differ