From 657ad82438eeb613056a3e7e3c75d803cf75dfc3 Mon Sep 17 00:00:00 2001 From: Tim Allison Date: Fri, 3 Aug 2018 17:14:34 +0000 Subject: [PATCH] bug 62597 -- bump max record sizes up based on new failures in regression set. I typically bumped to 2x the max found in regression set. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1837387 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/org/apache/poi/hdgf/streams/CompressedStreamStore.java | 2 +- src/scratchpad/src/org/apache/poi/hslf/record/ExOleObjStg.java | 2 +- src/scratchpad/src/org/apache/poi/hslf/record/SoundData.java | 2 +- .../org/apache/poi/hslf/record/UnknownRecordPlaceholder.java | 2 +- .../src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java | 2 +- src/scratchpad/src/org/apache/poi/hwpf/HWPFOldDocument.java | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/scratchpad/src/org/apache/poi/hdgf/streams/CompressedStreamStore.java b/src/scratchpad/src/org/apache/poi/hdgf/streams/CompressedStreamStore.java index 953987e7b4..0ed5540b5e 100644 --- a/src/scratchpad/src/org/apache/poi/hdgf/streams/CompressedStreamStore.java +++ b/src/scratchpad/src/org/apache/poi/hdgf/streams/CompressedStreamStore.java @@ -30,7 +30,7 @@ import org.apache.poi.util.IOUtils; public final class CompressedStreamStore extends StreamStore { //arbitrarily selected; may need to increase - private static final int MAX_RECORD_LENGTH = 1_000_000; + private static final int MAX_RECORD_LENGTH = 64_000_000; /** The raw, compressed contents */ private byte[] compressedContents; diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/ExOleObjStg.java b/src/scratchpad/src/org/apache/poi/hslf/record/ExOleObjStg.java index 6325fe8ec8..32f6d75ac7 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/record/ExOleObjStg.java +++ b/src/scratchpad/src/org/apache/poi/hslf/record/ExOleObjStg.java @@ -36,7 +36,7 @@ import org.apache.poi.util.LittleEndian; public class ExOleObjStg extends PositionDependentRecordAtom implements PersistRecord { //arbitrarily selected; may need to increase - private static final int MAX_RECORD_LENGTH = 1_000_000; + private static final int MAX_RECORD_LENGTH = 20_000_000; private int _persistId; // Found from PersistPtrHolder diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/SoundData.java b/src/scratchpad/src/org/apache/poi/hslf/record/SoundData.java index 63225ebcb4..a4676f63a6 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/record/SoundData.java +++ b/src/scratchpad/src/org/apache/poi/hslf/record/SoundData.java @@ -32,7 +32,7 @@ public final class SoundData extends RecordAtom { //arbitrarily selected; may need to increase - private static final int MAX_RECORD_LENGTH = 10_485_760; + private static final int MAX_RECORD_LENGTH = 100_000_000; /** * Record header. diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/UnknownRecordPlaceholder.java b/src/scratchpad/src/org/apache/poi/hslf/record/UnknownRecordPlaceholder.java index 92985f4ff0..db928f29ac 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/record/UnknownRecordPlaceholder.java +++ b/src/scratchpad/src/org/apache/poi/hslf/record/UnknownRecordPlaceholder.java @@ -34,7 +34,7 @@ public final class UnknownRecordPlaceholder extends RecordAtom { //arbitrarily selected; may need to increase - private static final int MAX_RECORD_LENGTH = 1_000_000; + private static final int MAX_RECORD_LENGTH = 20_000_000; private byte[] _contents; private long _type; diff --git a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java index c0676f2264..b6c9cc446e 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java +++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java @@ -66,7 +66,7 @@ public final class HSLFSlideShowImpl extends POIDocument implements Closeable { public static final int UNSET_OFFSET = -1; //arbitrarily selected; may need to increase - private static final int MAX_RECORD_LENGTH = 10_000_000; + private static final int MAX_RECORD_LENGTH = 200_000_000; // For logging private POILogger logger = POILogFactory.getLogger(this.getClass()); diff --git a/src/scratchpad/src/org/apache/poi/hwpf/HWPFOldDocument.java b/src/scratchpad/src/org/apache/poi/hwpf/HWPFOldDocument.java index 74220b0de2..230174637e 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/HWPFOldDocument.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/HWPFOldDocument.java @@ -55,7 +55,7 @@ public class HWPFOldDocument extends HWPFDocumentCore { .getLogger( HWPFOldDocument.class ); //arbitrarily selected; may need to increase - private static final int MAX_RECORD_LENGTH = 1_000_000; + private static final int MAX_RECORD_LENGTH = 10_000_000; private final static Charset DEFAULT_CHARSET = StringUtil.WIN_1252; -- 2.39.5