summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-02-17 14:47:10 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-02-17 18:53:41 +0100
commit7a4eaf4a74832621d8ae2525ee93501ed315e590 (patch)
tree6a41f7e6e5f392255943a2d2100f26573e253d55
parentd265bb1554c185ab9cd5bd63e584165e8b3ae0a1 (diff)
ofz: infinite loop
Change-Id: Ie54c22c65ccd962862cade77e3502a264164c2b2 Reviewed-on: https://gerrit.libreoffice.org/49912 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--lotuswordpro/source/filter/lwprowlayout.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/lotuswordpro/source/filter/lwprowlayout.cxx b/lotuswordpro/source/filter/lwprowlayout.cxx
index 8e90b856da45..02d9d221b304 100644
--- a/lotuswordpro/source/filter/lwprowlayout.cxx
+++ b/lotuswordpro/source/filter/lwprowlayout.cxx
@@ -68,6 +68,7 @@
#include <xfilter/xftable.hxx>
#include <xfilter/xfcell.hxx>
#include <xfilter/xfcellstyle.hxx>
+#include <set>
LwpRowLayout::LwpRowLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
: LwpVirtualLayout(objHdr, pStrm)
@@ -95,12 +96,16 @@ void LwpRowLayout::SetRowMap()
LwpObjectID& rCellID= GetChildHead();
LwpCellLayout * pCellLayout = dynamic_cast<LwpCellLayout *>(rCellID.obj().get());
+ std::set<LwpCellLayout*> aSeen;
while(pCellLayout)
{
+ aSeen.insert(pCellLayout);
pCellLayout->SetCellMap();
rCellID = pCellLayout->GetNext();
pCellLayout = dynamic_cast<LwpCellLayout *>(rCellID.obj().get());
+ if (aSeen.find(pCellLayout) != aSeen.end())
+ throw std::runtime_error("loop in conversion");
}
}
/**