summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-21 14:01:03 +0100
committerDavid Tardon <dtardon@redhat.com>2015-08-21 16:06:06 +0000
commitdc45a7debed78ca417c79d69cc0b8f35d62f7940 (patch)
treecd58a0ee885f73a87d4fdaf4e49cc15f37c06074 /sw
parent25330c39e5f80b3039f753d35b3e3546279fd5f2 (diff)
avoid hang in certain ww6 docs
Change-Id: Ife15f6a6e4b31c6e226a154dd708290266e86a2e (cherry picked from commit d0813b432f94d214a6961cb6a1eb11f65399e59b) Reviewed-on: https://gerrit.libreoffice.org/17911 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/core/data/ww6/pass/hang-1.docbin0 -> 6630 bytes
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
2 files changed, 1 insertions, 1 deletions
diff --git a/sw/qa/core/data/ww6/pass/hang-1.doc b/sw/qa/core/data/ww6/pass/hang-1.doc
new file mode 100644
index 000000000000..825283d51e19
--- /dev/null
+++ b/sw/qa/core/data/ww6/pass/hang-1.doc
Binary files differ
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 6b288f7969f5..1a33e2b76f8e 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -3881,7 +3881,7 @@ void SwWW8ImplReader::ReadAttrs(WW8_CP& rTextPos, WW8_CP& rNext, long nTextEnd,
{
m_aCurrAttrCP = rTextPos;
rNext = ReadTextAttr(rTextPos, nTextEnd, rbStartLine);
- if (rTextPos == rNext && rTextPos == WW8_CP_MAX)
+ if (rTextPos == rNext && rTextPos >= nTextEnd)
break;
}
while( rTextPos >= rNext );