summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-09-09 11:28:44 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-09-09 13:40:46 +0200
commit3642db420a66133ebe4aabb346ce0adca17e26e6 (patch)
treef82fa8ca286db5e7ad92d8f26f4d45daa109e9b6 /lotuswordpro
parent7a7cd044887ce6801791e1cf7eb18ac1a0e68e07 (diff)
ofz#51149 avoid Timeout
Change-Id: I7709e69154d231e597d364210bc876afca3df4a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139719 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwptablelayout.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx
index 7624664964d7..c2760c6c6c4c 100644
--- a/lotuswordpro/source/filter/lwptablelayout.cxx
+++ b/lotuswordpro/source/filter/lwptablelayout.cxx
@@ -81,6 +81,7 @@
#include <xfilter/xfparastyle.hxx>
#include <o3tl/sorted_vector.hxx>
#include <sal/log.hxx>
+#include <unotools/configmgr.hxx>
#include <algorithm>
#include <memory>
@@ -801,7 +802,14 @@ void LwpTableLayout::ParseTable()
sal_uInt16 nEndHeadRow;
pTableHeading->GetStartEndRow(nStartHeadRow,nEndHeadRow);
if (nStartHeadRow == 0)
+ {
+ if (utl::ConfigManager::IsFuzzing() && nEndHeadRow - nStartHeadRow > 128)
+ {
+ SAL_WARN("lwp", "truncating HeadingRow for fuzzing performance");
+ nEndHeadRow = nStartHeadRow + 128;
+ }
nContentRow = ConvertHeadingRow(m_pXFTable,nStartHeadRow,nEndHeadRow+1);
+ }
}
ConvertTable(m_pXFTable, nContentRow, nRow, 0, nCol);