summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-04-29 19:56:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2023-04-30 10:58:48 +0200
commit538956c32b867102b5174add3ea1990ae9d0b075 (patch)
tree10cb8156a89941a1a84d461f083d1ed5f5bfb06b /hwpfilter
parentdd15364793401e41bae45cdeb410808c9f94fa93 (diff)
ofz#58400 Timeout
Change-Id: I6ded0d0613b66f7ec075796e257d93cf25822d2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151189 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/source/hwpreader.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 302ebf7599f8..8ff1ba1d7541 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -1476,6 +1476,12 @@ void HwpReader::makePageStyle()
HWPInfo& hwpinfo = hwpfile.GetHWPInfo();
int pmCount = hwpfile.getColumnCount();
+ if (pmCount > 512 && utl::ConfigManager::IsFuzzing())
+ {
+ SAL_WARN("filter.hwp", "too many pages: " << pmCount << " clip to " << 512);
+ pmCount = 512;
+ }
+
for( int i = 0 ; i < pmCount ; i++ ){
mxList->addAttribute("style:name", sXML_CDATA, "pm" + OUString::number(i + 1));
startEl("style:page-master");