From 538956c32b867102b5174add3ea1990ae9d0b075 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 29 Apr 2023 19:56:46 +0100 Subject: ofz#58400 Timeout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I6ded0d0613b66f7ec075796e257d93cf25822d2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151189 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- hwpfilter/source/hwpreader.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'hwpfilter/source') 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"); -- cgit