From f7676f9755ab187be4d695d2630c8a6795a4904a Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 9 Feb 2018 14:59:23 +0000 Subject: ofz: time-out MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I89a1166f78938d7e36435bfeecb4a4f3f2ba9ad2 Reviewed-on: https://gerrit.libreoffice.org/49503 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- lotuswordpro/source/filter/lwpdoc.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lotuswordpro') 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 xStory(dynamic_cast(xContent->GetChildHead().obj(VO_STORY).get())); + std::set aSeen; while (xStory.is()) { + aSeen.insert(xStory.get()); //Register the child para xStory->SetFoundry(m_pFoundry); xStory->DoRegisterStyle(); xStory.set(dynamic_cast(xStory->GetNext().obj(VO_STORY).get())); + if (aSeen.find(xStory.get()) != aSeen.end()) + throw std::runtime_error("loop in conversion"); } } } -- cgit