diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-03-07 19:11:06 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-03-08 15:08:26 +0100 |
commit | 17cf56c127351ff61aeb75e84dfa884492f5252d (patch) | |
tree | f0caf26c377cc4aa7f478bc5c6ef397aa0bccb89 | |
parent | 1e95c2c17a49349caba1e62b4de3752c5f767f01 (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>
-rw-r--r-- | lotuswordpro/source/filter/lwprowlayout.cxx | 5 |
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); |