diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-29 09:14:34 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-03-29 12:09:51 +0200 |
commit | 980248e4926b7d24c197084038337e4868badb9c (patch) | |
tree | 5e6456446f46f1e62e8a413a990ec244125a85ba /lotuswordpro | |
parent | 7a6b66942260837e2a627b1df2a4fee9af1e3227 (diff) |
lwp infinite loop
Change-Id: I18506b74ac999893eab1d652b46ee2226f5a3dea
Reviewed-on: https://gerrit.libreoffice.org/52058
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/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 1d81a9334f5c..f52cf6d6ebbe 100644 --- a/lotuswordpro/source/filter/lwpstory.cxx +++ b/lotuswordpro/source/filter/lwpstory.cxx @@ -358,13 +358,17 @@ void LwpStory::XFConvertFrameInFrame(XFContentContainer* pCont) while (xLayout.get()) { rtl::Reference<LwpVirtualLayout> xFrameLayout(dynamic_cast<LwpVirtualLayout*>(xLayout->GetChildHead().obj().get())); + std::set<LwpVirtualLayout*> aSeen; while (xFrameLayout.is()) { + aSeen.insert(xFrameLayout.get()); if (xFrameLayout->IsAnchorFrame()) { 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 register style"); } xLayout = GetLayout(xLayout.get()); } |