aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java4
-rw-r--r--test-data/spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-5265527465181184.xlsxbin0 -> 10483 bytes
2 files changed, 3 insertions, 1 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java
index 47d9c22dd0..0ede2c2c5f 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java
@@ -54,8 +54,10 @@ public final class XSSFGraphicFrame extends XSSFShape {
protected XSSFGraphicFrame(XSSFDrawing drawing, CTGraphicalObjectFrame ctGraphicFrame) {
this.drawing = drawing; // protected field on XSSFShape
this.graphicFrame = ctGraphicFrame;
+
// TODO: there may be a better way to delegate this
- CTGraphicalObjectData graphicData = graphicFrame.getGraphic().getGraphicData();
+ CTGraphicalObjectData graphicData = graphicFrame.getGraphic() == null ?
+ null : graphicFrame.getGraphic().getGraphicData();
if (graphicData != null) {
NodeList nodes = graphicData.getDomNode().getChildNodes();
for (int i = 0; i < nodes.getLength(); i++) {
diff --git a/test-data/spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-5265527465181184.xlsx b/test-data/spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-5265527465181184.xlsx
new file mode 100644
index 0000000000..3a25e5588c
--- /dev/null
+++ b/test-data/spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-5265527465181184.xlsx
Binary files differ