summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-02-09 14:59:23 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-02-10 17:39:31 +0100
commitf7676f9755ab187be4d695d2630c8a6795a4904a (patch)
tree902273825609ca402a4f5d2fb884d6b8e3e68408 /lotuswordpro
parentbaf2bc036dfee6821478f67f551ec296b0fb4381 (diff)
ofz: time-out
Change-Id: I89a1166f78938d7e36435bfeecb4a4f3f2ba9ad2 Reviewed-on: https://gerrit.libreoffice.org/49503 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/lwpdoc.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/lotuswordpro/source/filter/lwpdoc.cxx b/lotuswordpro/source/filter/lwpdoc.cxx
index 7a0165191daf..9c91ea3bca50 100644
--- a/lotuswordpro/source/filter/lwpdoc.cxx
+++ b/lotuswordpro/source/filter/lwpdoc.cxx
@@ -290,12 +290,16 @@ void LwpDocument::RegisterStylesInPara()
if (xContent.is())
{
rtl::Reference<LwpStory> xStory(dynamic_cast<LwpStory*>(xContent->GetChildHead().obj(VO_STORY).get()));
+ std::set<LwpStory*> aSeen;
while (xStory.is())
{
+ aSeen.insert(xStory.get());
//Register the child para
xStory->SetFoundry(m_pFoundry);
xStory->DoRegisterStyle();
xStory.set(dynamic_cast<LwpStory*>(xStory->GetNext().obj(VO_STORY).get()));
+ if (aSeen.find(xStory.get()) != aSeen.end())
+ throw std::runtime_error("loop in conversion");
}
}
}