This is an automated email from the ASF dual-hosted git repository. centic pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/poi.git
commit c94e795f35342d153caf26af8208341845a3bf26 Author: Dominik Stadler <[email protected]> AuthorDate: Fri Jan 9 08:12:23 2026 +0100 Avoid NPE with broken files when writing endnotes for Word documents https://issues.oss-fuzz.com/issues/391728757 --- .../apache/poi/xslf/usermodel/XSLFAutoShape.java | 2 +- ...se-minimized-POIXSLFFuzzer-6372932378820608.pptx | Bin 0 -> 76054 bytes test-data/spreadsheet/stress.xls | Bin 74752 -> 74752 bytes 3 files changed, 1 insertion(+), 1 deletion(-) diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFAutoShape.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFAutoShape.java index 3bba3c5032..4284d7e815 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFAutoShape.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFAutoShape.java @@ -44,7 +44,7 @@ public class XSLFAutoShape extends XSLFTextShape implements AutoShape<XSLFShape, static XSLFAutoShape create(CTShape shape, XSLFSheet sheet) { if (shape.getSpPr().isSetCustGeom()) { return new XSLFFreeformShape(shape, sheet); - } else if (shape.getNvSpPr().getCNvSpPr().isSetTxBox()) { + } else if (shape.getNvSpPr().getCNvSpPr() != null && shape.getNvSpPr().getCNvSpPr().isSetTxBox()) { return new XSLFTextBox(shape, sheet); } else { return new XSLFAutoShape(shape, sheet); diff --git a/test-data/slideshow/clusterfuzz-testcase-minimized-POIXSLFFuzzer-6372932378820608.pptx b/test-data/slideshow/clusterfuzz-testcase-minimized-POIXSLFFuzzer-6372932378820608.pptx new file mode 100644 index 0000000000..c064fd422c Binary files /dev/null and b/test-data/slideshow/clusterfuzz-testcase-minimized-POIXSLFFuzzer-6372932378820608.pptx differ diff --git a/test-data/spreadsheet/stress.xls b/test-data/spreadsheet/stress.xls index 86981ef7c1..6fb06f73a6 100644 Binary files a/test-data/spreadsheet/stress.xls and b/test-data/spreadsheet/stress.xls differ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
