summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-03-28 08:56:11 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-03-28 08:56:25 +0100
commitdad9627997f4e4d37d31c36b4125e572406af0f2 (patch)
treef5973080248f14e400163c13d2d5fe772e59b497 /lotuswordpro
parent157cb703888f4187c2c6709b13ebf9f779580fe2 (diff)
ofz#955 timeout in lwp loading
Change-Id: I3665bd870cd601f2ac7fee59c087034d406ed07c
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpdoc.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwpdoc.cxx b/lotuswordpro/source/filter/lwpdoc.cxx
index d83da250ddf6..65eb22784ec7 100644
--- a/lotuswordpro/source/filter/lwpdoc.cxx
+++ b/lotuswordpro/source/filter/lwpdoc.cxx
@@ -613,7 +613,10 @@ LwpDocument* LwpDocument::GetPreviousDivision()
{
if(!pRoot->IsChildDoc())
return pRoot;
- pRoot = pRoot->GetParentDivision();
+ LwpDocument* pNextRoot = pRoot->GetParentDivision();
+ if (pNextRoot == pRoot)
+ throw std::runtime_error("loop in ParentDivision");
+ pRoot = pNextRoot;
}
return nullptr;
}