[Libreoffice-commits] core.git: sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Aug 30 15:54:13 UTC 2021


 sw/source/filter/ww8/ww8scan.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 0c7b733c2b9f2454717f94e2ae3b483e1bd3e830
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 30 12:18:16 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Aug 30 17:53:38 2021 +0200

    ofz: MemorySanitizer: use-of-uninitialized-value
    
    Change-Id: I5f5cb10e7e1792caa39644fc973ba34c27d85eb8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121298
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index d1ac0d4f4596..b79881604a8d 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -5854,9 +5854,6 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset):
         // above bit-field member initializations can be moved to the class definition
 {
     // See [MS-DOC] 2.5.15 "How to read the FIB".
-    sal_uInt8 aBits1;
-    sal_uInt8 aBits2;
-    sal_uInt8 aVer8Bits1;    // only used starting with WinWord 8
     rSt.Seek( nOffset );
     /*
         note desired number, identify file version number
@@ -5915,13 +5912,16 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset):
     rSt.ReadUInt16(nTmpLid);
     m_lid = LanguageType(nTmpLid);
     rSt.ReadInt16( m_pnNext );
+    sal_uInt8 aBits1(0);
     rSt.ReadUChar( aBits1 );
+    sal_uInt8 aBits2(0);
     rSt.ReadUChar( aBits2 );
     rSt.ReadUInt16( m_nFibBack );
     rSt.ReadUInt16( m_nHash );
     rSt.ReadUInt16( m_nKey );
     rSt.ReadUChar( m_envr );
-    rSt.ReadUChar( aVer8Bits1 );      // only have an empty reserve field under Ver67
+    sal_uInt8 aVer8Bits1(0);     // only used starting with WinWord 8
+    rSt.ReadUChar( aVer8Bits1 ); // only have an empty reserve field under Ver67
                             // content from aVer8Bits1
 
                             // sal_uInt8 fMac              :1;


More information about the Libreoffice-commits mailing list