aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2024-07-14 11:26:43 +0000
committerDominik Stadler <centic@apache.org>2024-07-14 11:26:43 +0000
commit7601beb5921fa38fe654ebf8f26d717a4e1966ee (patch)
tree8a19d04a7b753d991b0357be9cb762d45beda215
parent148ac23c0d2e17f25d943659b5c5d769f1df9fdb (diff)
downloadpoi-7601beb5921fa38fe654ebf8f26d717a4e1966ee.tar.gz
poi-7601beb5921fa38fe654ebf8f26d717a4e1966ee.zip
Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a NullPointerException Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=70273 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919213 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/XDGFSheet.java4
-rw-r--r--test-data/diagram/clusterfuzz-testcase-minimized-POIVisioFuzzer-5026516754628608.vsdxbin0 -> 24625 bytes
-rw-r--r--test-data/spreadsheet/stress.xlsbin67584 -> 67584 bytes
3 files changed, 2 insertions, 2 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/XDGFSheet.java b/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/XDGFSheet.java
index ef363efc8e..11621ded35 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/XDGFSheet.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/XDGFSheet.java
@@ -73,9 +73,9 @@ public abstract class XDGFSheet {
for (SectionType section: sheet.getSectionArray()) {
String name = section.getN();
- if (name.equals("Geometry")) {
+ if ("Geometry".equals(name)) {
_geometry.put(section.getIX(), new GeometrySection(section, this));
- } else if (name.equals("Character")) {
+ } else if ("Character".equals(name)) {
_character = new CharacterSection(section, this);
} else {
_sections.put(name, XDGFSection.load(section, this));
diff --git a/test-data/diagram/clusterfuzz-testcase-minimized-POIVisioFuzzer-5026516754628608.vsdx b/test-data/diagram/clusterfuzz-testcase-minimized-POIVisioFuzzer-5026516754628608.vsdx
new file mode 100644
index 0000000000..4cbf5eb42a
--- /dev/null
+++ b/test-data/diagram/clusterfuzz-testcase-minimized-POIVisioFuzzer-5026516754628608.vsdx
Binary files differ
diff --git a/test-data/spreadsheet/stress.xls b/test-data/spreadsheet/stress.xls
index 04046bd635..3baca6559b 100644
--- a/test-data/spreadsheet/stress.xls
+++ b/test-data/spreadsheet/stress.xls
Binary files differ