diff options
-rw-r--r-- | poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/XDGFMasters.java | 7 | ||||
-rw-r--r-- | test-data/diagram/clusterfuzz-testcase-minimized-POIVisioFuzzer-5492358185353216.vsdx | bin | 0 -> 106491 bytes | |||
-rw-r--r-- | test-data/spreadsheet/stress.xls | bin | 68096 -> 68608 bytes |
3 files changed, 6 insertions, 1 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/XDGFMasters.java b/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/XDGFMasters.java index 7bc97dd79f..315c5921b4 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/XDGFMasters.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/XDGFMasters.java @@ -27,6 +27,8 @@ import java.util.Map; import com.microsoft.schemas.office.visio.x2012.main.MasterType; import com.microsoft.schemas.office.visio.x2012.main.MastersDocument; import com.microsoft.schemas.office.visio.x2012.main.MastersType; +import com.microsoft.schemas.office.visio.x2012.main.RelType; + import org.apache.poi.ooxml.POIXMLDocumentPart; import org.apache.poi.ooxml.POIXMLException; import org.apache.poi.openxml4j.opc.PackagePart; @@ -68,7 +70,10 @@ public class XDGFMasters extends XDGFXMLDocumentPart { Map<String, MasterType> masterSettings = new HashMap<>(); for (MasterType master: _mastersObject.getMasterArray()) { - masterSettings.put(master.getRel().getId(), master); + RelType rel = master.getRel(); + if (rel != null) { + masterSettings.put(rel.getId(), master); + } } // create the masters diff --git a/test-data/diagram/clusterfuzz-testcase-minimized-POIVisioFuzzer-5492358185353216.vsdx b/test-data/diagram/clusterfuzz-testcase-minimized-POIVisioFuzzer-5492358185353216.vsdx Binary files differnew file mode 100644 index 0000000000..b08f248233 --- /dev/null +++ b/test-data/diagram/clusterfuzz-testcase-minimized-POIVisioFuzzer-5492358185353216.vsdx diff --git a/test-data/spreadsheet/stress.xls b/test-data/spreadsheet/stress.xls Binary files differindex 7f0fb70430..efe00e3845 100644 --- a/test-data/spreadsheet/stress.xls +++ b/test-data/spreadsheet/stress.xls |