diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-02-19 14:47:24 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-02-19 21:44:37 +0100 |
commit | 3668960d94d21ad215c2cbe02f95560416b0a9e3 (patch) | |
tree | 6ab1a38ceb6eebf9861cc8b9c80132862ae99824 /lotuswordpro/source/filter/lwprowlayout.cxx | |
parent | 5f0eacd721bb98a49d6066c28d4d8fddd8fda292 (diff) |
ofz: infinite loop
Change-Id: Ie515421f484c63d07f10e8551464c7dc11facb73
Reviewed-on: https://gerrit.libreoffice.org/50001
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/source/filter/lwprowlayout.cxx')
-rw-r--r-- | lotuswordpro/source/filter/lwprowlayout.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwprowlayout.cxx b/lotuswordpro/source/filter/lwprowlayout.cxx index 02d9d221b304..ca1f43979e09 100644 --- a/lotuswordpro/source/filter/lwprowlayout.cxx +++ b/lotuswordpro/source/filter/lwprowlayout.cxx @@ -140,12 +140,18 @@ void LwpRowLayout::RegisterStyle() LwpObjectID& rCellID= GetChildHead(); LwpCellLayout * pCellLayout = dynamic_cast<LwpCellLayout *>(rCellID.obj().get()); - while(pCellLayout) + std::set<LwpCellLayout*> aSeen; + while (pCellLayout) { + aSeen.insert(pCellLayout); + pCellLayout->SetFoundry(m_pFoundry); pCellLayout->RegisterStyle(); rCellID = pCellLayout->GetNext(); pCellLayout = dynamic_cast<LwpCellLayout *>(rCellID.obj().get()); + + if (aSeen.find(pCellLayout) != aSeen.end()) + throw std::runtime_error("loop in conversion"); } } |