From: Dominik Stadler Date: Fri, 27 Oct 2023 10:07:57 +0000 (+0000) Subject: Bug 66425: Avoid exceptions found via poi-fuzz X-Git-Tag: REL_5_2_5~25 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5cc8b9958cbe1d1ca0fc378eb10e3123ed71e4ad;p=poi.git Bug 66425: Avoid exceptions found via poi-fuzz Fix one expected exception-text which is different on newer Java versions Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63266 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913383 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTextParagraph.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTextParagraph.java index f93c644744..55e52db3d8 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTextParagraph.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTextParagraph.java @@ -836,7 +836,7 @@ public class XSSFTextParagraph implements Iterable{ public ListAutoNumber getBulletAutoNumberScheme() { ParagraphPropertyFetcher fetcher = new ParagraphPropertyFetcher(getLevel()){ public boolean fetch(CTTextParagraphProperties props){ - if(props.isSetBuAutoNum()) { + if(props.isSetBuAutoNum() && props.getBuAutoNum().getType() != null) { setValue(ListAutoNumber.values()[props.getBuAutoNum().getType().intValue() - 1]); return true; } diff --git a/test-data/spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-6419366255919104.xlsx b/test-data/spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-6419366255919104.xlsx new file mode 100644 index 0000000000..2a3a0d7d64 Binary files /dev/null and b/test-data/spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-6419366255919104.xlsx differ