From 360c05d9e3496cb6b49e73732615fd9daedf40aa Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Tue, 3 Oct 2023 06:05:30 +0000 Subject: Bug 66425: Avoid exceptions found via poi-fuzz We try to avoid throwing NullPointerException, ClassCastExceptions and StackOverflowException, but it was possible to trigger them Also improve some exception messages Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62698 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62606 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62685 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912707 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/poi/hdgf/streams/PointerContainingStream.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'poi-scratchpad') diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hdgf/streams/PointerContainingStream.java b/poi-scratchpad/src/main/java/org/apache/poi/hdgf/streams/PointerContainingStream.java index c4a91ad969..62817dd2c1 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hdgf/streams/PointerContainingStream.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hdgf/streams/PointerContainingStream.java @@ -30,7 +30,7 @@ import org.apache.poi.hdgf.pointers.PointerFactory; public class PointerContainingStream extends Stream { // TODO - instantiable superclass private static final Logger LOG = LogManager.getLogger(PointerContainingStream.class); - private static final int MAX_CHILDREN_NESTING = 1000; + private static final int MAX_CHILDREN_NESTING = 500; private final Pointer[] childPointers; private Stream[] childStreams; -- cgit v1.2.3