[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sw/qa sw/source

Caolán McNamara caolanm at redhat.com
Tue Aug 25 00:35:43 PDT 2015


 sw/qa/core/data/ww5/pass/crash-1.doc |binary
 sw/source/filter/ww8/ww8scan.cxx     |    5 ++---
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit ced9ee8e90a7ce8778cf07733ce05ab85d5f4bdb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 24 15:29:54 2015 +0100

    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/17958
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

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 0000000..5b94b9a
Binary files /dev/null and b/sw/qa/core/data/ww5/pass/crash-1.doc differ
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index c227c12..21a74b1 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -4161,10 +4161,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;
@@ -4187,7 +4187,6 @@ OUString WW8PLCFx_Book::GetBookmark(long nStart,long nEnd, sal_uInt16 &nIndex)
             }
             ++i;
         }
-        while (i < pBook[0]->GetIMax());
     }
     return bFound ? aBookNames[i] : OUString();
 }


More information about the Libreoffice-commits mailing list