Browse Source

Bug 66425: Avoid Exceptions found via oss-fuzz

We try to avoid throwing NullPointerExceptions or endless allocations,
but it was possible to trigger one here with a specially
crafted input-file

Should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62745

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912795 13f79535-47bb-0310-9956-ffa450edef68
tags/REL_5_2_5
Dominik Stadler 7 months ago
parent
commit
eb11f3324f

+ 2
- 2
poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/section/geometry/LineTo.java View File

@@ -43,9 +43,9 @@ public class LineTo implements GeometryRow {
for (CellType cell : row.getCellArray()) {
String cellName = cell.getN();

if (cellName.equals("X")) {
if ("X".equals(cellName)) {
x = XDGFCell.parseDoubleValue(cell);
} else if (cellName.equals("Y")) {
} else if ("Y".equals(cellName)) {
y = XDGFCell.parseDoubleValue(cell);
} else {
throw new POIXMLException("Invalid cell '" + cellName

BIN
test-data/diagram/clusterfuzz-testcase-minimized-POIVisioFuzzer-5981064948219904.vsdx View File


BIN
test-data/spreadsheet/stress.xls View File


Loading…
Cancel
Save