From 3642db420a66133ebe4aabb346ce0adca17e26e6 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 9 Sep 2022 11:28:44 +0100 Subject: ofz#51149 avoid Timeout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I7709e69154d231e597d364210bc876afca3df4a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139719 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- lotuswordpro/source/filter/lwptablelayout.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lotuswordpro') 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 #include #include +#include #include #include @@ -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); -- cgit