From 360c05d9e3496cb6b49e73732615fd9daedf40aa Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Tue, 3 Oct 2023 06:05:30 +0000 Subject: [PATCH] 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 --- .../org/apache/poi/xslf/usermodel/XSLFGraphicFrame.java | 4 ++++ .../java/org/apache/poi/xslf/usermodel/XSLFTableCell.java | 4 ++-- .../java/org/apache/poi/xssf/streaming/SXSSFSheet.java | 8 ++++++-- .../apache/poi/hdgf/streams/PointerContainingStream.java | 2 +- .../java/org/apache/poi/hssf/record/OldStringRecord.java | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFGraphicFrame.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFGraphicFrame.java index ceccd10635..c744f2ab73 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFGraphicFrame.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFGraphicFrame.java @@ -67,6 +67,10 @@ public class XSLFGraphicFrame extends XSLFShape implements GraphicalFrame