[Libreoffice-commits] core.git: lotuswordpro/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sun Mar 8 14:09:07 UTC 2020
lotuswordpro/source/filter/lwprowlayout.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 17cf56c127351ff61aeb75e84dfa884492f5252d
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Mar 7 19:11:06 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Mar 8 15:08:26 2020 +0100
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 at redhat.com>
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);
More information about the Libreoffice-commits
mailing list