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

Caolán McNamara caolanm at redhat.com
Thu Jul 23 01:35:01 PDT 2015


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

New commits:
commit b69fe027705ed2a000ca7bdcee1290baf701d9d3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jul 21 17:06:05 2015 +0100

    need to check for after reading and before seeking
    
    seeking resets eof, so the IsEof is always false
    after the first loop
    
    Change-Id: I2e533f3f9c494566aabb947c05258a770e883b1f
    (cherry picked from commit e2e6fa5ad5aaa20a9fa8a6d060d9edd241aefd52)
    Reviewed-on: https://gerrit.libreoffice.org/17273
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/sw/qa/core/data/ww8/pass/hang-1.doc b/sw/qa/core/data/ww8/pass/hang-1.doc
new file mode 100644
index 0000000..8d68bbb
Binary files /dev/null and b/sw/qa/core/data/ww8/pass/hang-1.doc differ
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index c87815c..a3598fb 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -1297,15 +1297,14 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_)
     {
         bOk = false;
 
-        if (rSt.IsEof())
-            break;
-
         WW8LFO aLFO;
         memset(&aLFO, 0, sizeof( aLFO ));
 
         rSt.ReadUInt32( aLFO.nIdLst );
         rSt.SeekRel( 8 );
         rSt.ReadUChar( aLFO.nLfoLvl );
+        if (!rSt.good())
+            break;
         rSt.SeekRel( 3 );
         // soviele Overrides existieren
         if ((nMaxLevel < aLFO.nLfoLvl) || rSt.GetError())


More information about the Libreoffice-commits mailing list