Skip to content

Commit

Permalink
Bug 66425: Avoid Exceptions found via oss-fuzz
Browse files Browse the repository at this point in the history
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
  • Loading branch information
centic9 committed Oct 7, 2023
1 parent 50b4da4 commit eb11f33
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ public LineTo(RowType row) {
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
Expand Down
Binary file not shown.
Binary file modified test-data/spreadsheet/stress.xls
Binary file not shown.

0 comments on commit eb11f33

Please sign in to comment.