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 5338b17a8f241595aabec7348bca799831b25b66
Author: Dominik Stadler <[email protected]>
AuthorDate: Sat Feb 14 16:53:30 2026 +0100

    Avoid NPE with malformed Visio diagram
    
    Fixes https://issues.oss-fuzz.com/issues/477312394
---
 .../xdgf/usermodel/section/geometry/RelLineTo.java  |   4 ++++
 ...e-minimized-POIVisioFuzzer-6312416206454784.vsdx | Bin 0 -> 33849 bytes
 test-data/spreadsheet/stress.xls                    | Bin 78336 -> 78848 bytes
 3 files changed, 4 insertions(+)

diff --git 
a/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/section/geometry/RelLineTo.java
 
b/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/section/geometry/RelLineTo.java
index e6a9731b66..2ec8d394a9 100644
--- 
a/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/section/geometry/RelLineTo.java
+++ 
b/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/section/geometry/RelLineTo.java
@@ -47,6 +47,10 @@ public class RelLineTo implements GeometryRow {
         for (CellType cell : row.getCellArray()) {
             String cellName = cell.getN();
 
+            if (cellName == null) {
+                throw new IllegalStateException("Cannot create a ReLineTo 
object without a cell-name indicating 'X' or 'Y' direction");
+            }
+
             if (cellName.equals("X")) {
                 x = XDGFCell.parseDoubleValue(cell);
             } else if (cellName.equals("Y")) {
diff --git 
a/test-data/diagram/clusterfuzz-testcase-minimized-POIVisioFuzzer-6312416206454784.vsdx
 
b/test-data/diagram/clusterfuzz-testcase-minimized-POIVisioFuzzer-6312416206454784.vsdx
new file mode 100644
index 0000000000..e05ab739fa
Binary files /dev/null and 
b/test-data/diagram/clusterfuzz-testcase-minimized-POIVisioFuzzer-6312416206454784.vsdx
 differ
diff --git a/test-data/spreadsheet/stress.xls b/test-data/spreadsheet/stress.xls
index a4ba77404e..9b4388c582 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]

Reply via email to