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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Sep 3 18:58:57 UTC 2021


 vcl/source/filter/imet/ios2met.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit e561b8a2a2369c11c7d9ed2e82631d291c76c77d
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Sep 3 09:38:06 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Sep 3 20:58:22 2021 +0200

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

diff --git a/vcl/source/filter/imet/ios2met.cxx b/vcl/source/filter/imet/ios2met.cxx
index 0888a84c576d..09ef10a95aa5 100644
--- a/vcl/source/filter/imet/ios2met.cxx
+++ b/vcl/source/filter/imet/ios2met.cxx
@@ -2072,7 +2072,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
                 pOS2MET->SeekRel(4); nLen-=4;
             }
             if (nLen>=2) {
-                sal_uInt8 nbyte;
+                sal_uInt8 nbyte(0);
                 pOS2MET->ReadUChar( nbyte );
                 if ((nbyte&0x80)==0 && aAttr.aChrCellSize==Size(0,0))
                     aAttr.aChrCellSize = aDefAttr.aChrCellSize;
@@ -2097,7 +2097,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
         case GOrdPMkPrc: PushAttr(nOrderID);
             [[fallthrough]];
         case GOrdSMkPrc: {
-            sal_uInt8 nbyte;
+            sal_uInt8 nbyte(0);
             pOS2MET->ReadUChar( nbyte );
             if (nbyte==0) aAttr.nMrkPrec=aDefAttr.nMrkPrec;
             else aAttr.nMrkPrec=nbyte;
@@ -2406,7 +2406,7 @@ void OS2METReader::ReadFont(sal_uInt16 nFieldSize)
                 break;
             case 0x1f: { // Font Attributes
                 FontWeight eWeight;
-                sal_uInt8 nbyte;
+                sal_uInt8 nbyte(0);
                 pOS2MET->ReadUChar( nbyte );
                 switch (nbyte) {
                     case 1:  eWeight=WEIGHT_THIN;       break;


More information about the Libreoffice-commits mailing list