lotuswordpro/source/filter/lwpstory.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit f6ddb203a74cf3373df15636cf9ac2973abdca66 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Oct 4 16:39:50 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Oct 4 22:19:50 2019 +0200 ofz#17675 loop in lwp filter Change-Id: Id0c75e03794a622a9353559453ab5688c31f4b9d Reviewed-on: https://gerrit.libreoffice.org/80238 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/lotuswordpro/source/filter/lwpstory.cxx b/lotuswordpro/source/filter/lwpstory.cxx index 32d6342e47dc..2474dc03202a 100644 --- a/lotuswordpro/source/filter/lwpstory.cxx +++ b/lotuswordpro/source/filter/lwpstory.cxx @@ -322,8 +322,10 @@ void LwpStory::XFConvertFrameInPage(XFContentContainer* pCont) while (xLayout.is()) { rtl::Reference<LwpVirtualLayout> xFrameLayout(dynamic_cast<LwpVirtualLayout*>(xLayout->GetChildHead().obj().get())); + std::set<LwpVirtualLayout*> aSeen; while (xFrameLayout.is()) { + aSeen.insert(xFrameLayout.get()); if( xFrameLayout->IsAnchorPage() && (xFrameLayout->IsFrame() || xFrameLayout->IsSuperTable() @@ -332,6 +334,8 @@ void LwpStory::XFConvertFrameInPage(XFContentContainer* pCont) xFrameLayout->DoXFConvert(pCont); } xFrameLayout.set(dynamic_cast<LwpVirtualLayout*>(xFrameLayout->GetNext().obj().get())); + if (aSeen.find(xFrameLayout.get()) != aSeen.end()) + throw std::runtime_error("loop in conversion"); } xLayout = GetLayout(xLayout.get()); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits