diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-10-04 16:39:50 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-10-04 22:19:50 +0200 |
commit | f6ddb203a74cf3373df15636cf9ac2973abdca66 (patch) | |
tree | da82be37510c9af1d0a75e9e4d4f5d88f339c0b4 /lotuswordpro | |
parent | 60ef0a2ff7fad0d94f4cc5020df3aee14568a82c (diff) |
ofz#17675 loop in lwp filter
Change-Id: Id0c75e03794a622a9353559453ab5688c31f4b9d
Reviewed-on: https://gerrit.libreoffice.org/80238
Tested-by: Jenkins
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/lwpstory.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
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()); } |