summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-01 10:17:00 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-03-01 13:55:47 +0100
commitca3c3ac4bb100ac195e205f6ebfe6756d8a41174 (patch)
treea6b943912e8204559716705fa08009a232fad4e4 /lotuswordpro
parentac3f35a9572e12cb22b731683d02af6714174551 (diff)
ofz: infinite loop
Change-Id: I2c0ac101ccdd3f5359a885d976275fa6e63a3f67 Reviewed-on: https://gerrit.libreoffice.org/50558 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwptablelayout.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx
index 33a7b412efa7..f12203db0c60 100644
--- a/lotuswordpro/source/filter/lwptablelayout.cxx
+++ b/lotuswordpro/source/filter/lwptablelayout.cxx
@@ -1107,14 +1107,18 @@ void LwpTableLayout::PutCellVals(LwpFoundry* pFoundry, LwpObjectID aTableID)
LwpTableRange* pTableRange = pHolder ? dynamic_cast<LwpTableRange*>(pHolder->GetHeadID().obj().get()) : nullptr;
//Look up the table
- while (nullptr!=pTableRange)
+ std::set<LwpTableRange*> aTableSeen;
+ while (pTableRange)
{
+ aTableSeen.insert(pTableRange);
LwpObjectID aID = pTableRange->GetTableID();
if (aID == aTableID)
{
break;
}
pTableRange = pTableRange->GetNext();
+ if (aTableSeen.find(pTableRange) != aTableSeen.end())
+ throw std::runtime_error("loop in conversion");
}
if (!pTableRange)