summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-24 15:29:54 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-08-24 15:35:16 +0100
commit02e9b490a9401744a8a0699ad5dd10281b6b0b30 (patch)
tree06aa3de0df79b123c89df7912e7331d40e1de660 /sw
parent6b82437dca30eba0f0c9dde6fdc84cb8f7740f8f (diff)
loop over successfully read bookmarks
not over the amount that should be there Change-Id: Ia2c353f9d7e274a5bebf405e1743ef1d1872b4de
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/core/data/ww5/pass/crash-1.docbin0 -> 3714 bytes
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx5
2 files changed, 2 insertions, 3 deletions
diff --git a/sw/qa/core/data/ww5/pass/crash-1.doc b/sw/qa/core/data/ww5/pass/crash-1.doc
new file mode 100644
index 000000000000..5b94b9a5584b
--- /dev/null
+++ b/sw/qa/core/data/ww5/pass/crash-1.doc
Binary files differ
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 19e813231002..d6231a16d24b 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -4129,10 +4129,10 @@ OUString WW8PLCFx_Book::GetBookmark(long nStart,long nEnd, sal_uInt16 &nIndex)
{
bool bFound = false;
sal_uInt16 i = 0;
- if( pBook[0] && pBook[1] )
+ if (pBook[0] && pBook[1])
{
WW8_CP nStartAkt, nEndAkt;
- do
+ while (i < aBookNames.size())
{
void* p;
sal_uInt16 nEndIdx;
@@ -4155,7 +4155,6 @@ OUString WW8PLCFx_Book::GetBookmark(long nStart,long nEnd, sal_uInt16 &nIndex)
}
++i;
}
- while (i < pBook[0]->GetIMax());
}
return bFound ? aBookNames[i] : OUString();
}