Преглед на файлове

Bug 66425: Avoid a NullPointerException found via oss-fuzz

We try to avoid throwing NullPointerException, 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=62059

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912127 13f79535-47bb-0310-9956-ffa450edef68
tags/REL_5_2_4
Dominik Stadler преди 8 месеца
родител
ревизия
b801711afe
променени са 3 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3
    0
      poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTableStyle.java
  2. Двоични данни
      test-data/spreadsheet/clusterfuzz-testcase-minimized-XLSX2CSVFuzzer-5542865479270400.xlsx
  3. Двоични данни
      test-data/spreadsheet/stress.xls

+ 3
- 0
poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTableStyle.java Целия файл

@@ -84,6 +84,9 @@ public class XSSFTableStyle implements TableStyle {
}

for (CTTableStyleElement element : tableStyle.getTableStyleElementList()) {
if (element.getType() == null) {
throw new IllegalArgumentException("Did not have a type in table-style " + element);
}
TableStyleType type = TableStyleType.valueOf(element.getType().toString());
DifferentialStyleProvider dstyle = null;
if (element.isSetDxfId()) {

Двоични данни
test-data/spreadsheet/clusterfuzz-testcase-minimized-XLSX2CSVFuzzer-5542865479270400.xlsx Целия файл


Двоични данни
test-data/spreadsheet/stress.xls Целия файл


Loading…
Отказ
Запис