[Libreoffice-commits] core.git: lotuswordpro/source
Caolán McNamara
caolanm at redhat.com
Thu Mar 1 13:48:56 UTC 2018
lotuswordpro/source/filter/lwplayout.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 9122f4598450d8a96e63fb29cc8166a6ae09587a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Mar 1 10:20:43 2018 +0000
ofz: infinite loop
Change-Id: I88b3d8bef0c522e4aa5e16ea8d45f7ea79337300
Reviewed-on: https://gerrit.libreoffice.org/50559
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx
index 931539851d46..e753d4722725 100644
--- a/lotuswordpro/source/filter/lwplayout.cxx
+++ b/lotuswordpro/source/filter/lwplayout.cxx
@@ -518,13 +518,17 @@ void LwpHeadLayout::RegisterStyle()
rtl::Reference<LwpVirtualLayout> LwpHeadLayout::FindEnSuperTableLayout()
{
rtl::Reference<LwpVirtualLayout> xLayout(dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get()));
+ std::set<LwpVirtualLayout*> aSeen;
while (xLayout.get())
{
+ aSeen.insert(xLayout.get());
if (xLayout->GetLayoutType() == LWP_ENDNOTE_SUPERTABLE_LAYOUT)
{
return xLayout;
}
xLayout.set(dynamic_cast<LwpVirtualLayout*>(xLayout->GetNext().obj().get()));
+ if (aSeen.find(xLayout.get()) != aSeen.end())
+ throw std::runtime_error("loop in conversion");
}
return rtl::Reference<LwpVirtualLayout>();
}
More information about the Libreoffice-commits
mailing list