summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-24 15:29:54 +0100
committerDavid Tardon <dtardon@redhat.com>2015-08-25 08:03:39 +0000
commitfc8da14e6ec6db437bd2959efd63391c7632a23d (patch)
tree3fd5506d2fce3b12c9a52660134922b814fa4850 /sw
parent35b895a710b9f43fbffc6ff7dcc461de4663bbba (diff)
loop over successfully read bookmarks
not over the amount that should be there Change-Id: Ia2c353f9d7e274a5bebf405e1743ef1d1872b4de (cherry picked from commit 02e9b490a9401744a8a0699ad5dd10281b6b0b30) Reviewed-on: https://gerrit.libreoffice.org/17960 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/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 366bd318a917..1a97613ae163 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -4142,10 +4142,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;
@@ -4168,7 +4168,6 @@ OUString WW8PLCFx_Book::GetBookmark(long nStart,long nEnd, sal_uInt16 &nIndex)
}
++i;
}
- while (i < pBook[0]->GetIMax());
}
return bFound ? aBookNames[i] : OUString();
}