hwpfilter/source/hwpreader.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 538956c32b867102b5174add3ea1990ae9d0b075
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sat Apr 29 19:56:46 2023 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sun Apr 30 10:58:48 2023 +0200

    ofz#58400 Timeout
    
    Change-Id: I6ded0d0613b66f7ec075796e257d93cf25822d2b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151189
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

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");

Reply via email to