lotuswordpro/source/filter/lwpdoc.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit e27628946c9ea97429d6cebc8b5a790304c8c07f Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jan 30 10:41:29 2018 +0000 ofz: loop detect Change-Id: Ie0b54686e1406c5114148f9fe9a0bacfb5b607e8 Reviewed-on: https://gerrit.libreoffice.org/48899 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> 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"); } } /** _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits