diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-02-17 14:47:10 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-02-17 18:53:41 +0100 |
commit | 7a4eaf4a74832621d8ae2525ee93501ed315e590 (patch) | |
tree | 6a41f7e6e5f392255943a2d2100f26573e253d55 /lotuswordpro | |
parent | d265bb1554c185ab9cd5bd63e584165e8b3ae0a1 (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>
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwprowlayout.cxx | 5 |
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"); } } /** |