summaryrefslogtreecommitdiff
path: root/lotuswordpro/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-03-07 19:11:06 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-03-08 15:08:26 +0100
commit17cf56c127351ff61aeb75e84dfa884492f5252d (patch)
treef0caf26c377cc4aa7f478bc5c6ef397aa0bccb89 /lotuswordpro/source
parent1e95c2c17a49349caba1e62b4de3752c5f767f01 (diff)
ofz#20635 infinite loop
Change-Id: I7b40df05307e3dd7768e9407040eb4fa285d51e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90174 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'lotuswordpro/source')
-rw-r--r--lotuswordpro/source/filter/lwprowlayout.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwprowlayout.cxx b/lotuswordpro/source/filter/lwprowlayout.cxx
index 811b7abb762e..2cc3bd59bbf9 100644
--- a/lotuswordpro/source/filter/lwprowlayout.cxx
+++ b/lotuswordpro/source/filter/lwprowlayout.cxx
@@ -403,7 +403,10 @@ void LwpRowLayout::ConvertCommonRow(rtl::Reference<XFTable> const & pXFTable, sa
if (pCellLayout->GetLayoutType() == LWP_CONNECTED_CELL_LAYOUT)
{
LwpConnectedCellLayout* pConnCell = static_cast<LwpConnectedCellLayout*>(pCellLayout);
- nCellEndCol = i+pConnCell->GetNumcols()-1;
+ auto nNumCols = pConnCell->GetNumcols();
+ if (!nNumCols)
+ throw std::runtime_error("loop in conversion");
+ nCellEndCol = i + nNumCols - 1;
i = nCellEndCol;
}
xCell = pCellLayout->DoConvertCell(pTable->GetObjectID(),crowid,i);