From 5cc8b9958cbe1d1ca0fc378eb10e3123ed71e4ad Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Fri, 27 Oct 2023 10:07:57 +0000 Subject: [PATCH] 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 --- .../poi/xssf/usermodel/XSSFTextParagraph.java | 2 +- ...minimized-POIXSSFFuzzer-6419366255919104.xlsx | Bin 0 -> 8420 bytes 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 test-data/spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-6419366255919104.xlsx 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 0000000000000000000000000000000000000000..2a3a0d7d648b5f0f1a06c740b8ba434926c04648 GIT binary patch literal 8420 zcmeHMWmFvNmc@g+1#8?LlHd-(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