summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-01-30 10:41:29 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-01-30 21:31:49 +0100
commite27628946c9ea97429d6cebc8b5a790304c8c07f (patch)
treece4921d56e2b6e6305f5a6e89242ab333df6144d /lotuswordpro
parentd7f5e7e04adf607a5f82185777a2167bfde20fff (diff)
ofz: loop detect
Change-Id: Ie0b54686e1406c5114148f9fe9a0bacfb5b607e8 Reviewed-on: https://gerrit.libreoffice.org/48899 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/lwpdoc.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwpdoc.cxx b/lotuswordpro/source/filter/lwpdoc.cxx
index 72921cbae903..27db9a01978d 100644
--- a/lotuswordpro/source/filter/lwpdoc.cxx
+++ b/lotuswordpro/source/filter/lwpdoc.cxx
@@ -312,11 +312,15 @@ void LwpDocument::RegisterBulletStyles()
return;
LwpSilverBullet* pBullet = dynamic_cast<LwpSilverBullet*>
(pBulletHead->GetHeadID().obj().get());
- while(pBullet)
+ std::set<LwpSilverBullet*> aSeen;
+ while (pBullet)
{
+ aSeen.insert(pBullet);
pBullet->SetFoundry(m_pFoundry);
pBullet->RegisterStyle();
pBullet = dynamic_cast<LwpSilverBullet*> (pBullet->GetNext().obj().get());
+ if (aSeen.find(pBullet) != aSeen.end())
+ throw std::runtime_error("loop in conversion");
}
}
/**