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>
This commit is contained in:
Caolán McNamara 2022-09-09 11:28:44 +01:00
parent 7a7cd04488
commit 3642db420a

View file

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