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

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


 vcl/source/filter/ipict/ipict.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c532ee59d1fef349fc1b5afc86cfa212e9976697
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Sep 3 12:19:14 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Sep 3 20:57:41 2021 +0200

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

diff --git a/vcl/source/filter/ipict/ipict.cxx b/vcl/source/filter/ipict/ipict.cxx
index 65e1f87221be..13b2b7eb7d55 100644
--- a/vcl/source/filter/ipict/ipict.cxx
+++ b/vcl/source/filter/ipict/ipict.cxx
@@ -1871,7 +1871,7 @@ sal_uInt64 PictReader::ReadData(sal_uInt16 nOpcode)
     default: // 0x00a2 bis 0xffff (most times reserved)
         if      (nOpcode<=0x00af) { pPict->ReadUInt16( nUSHORT ); nDataSize=2+nUSHORT; }
         else if (nOpcode<=0x00cf) { nDataSize=0; }
-        else if (nOpcode<=0x00fe) { sal_uInt32 nTemp; pPict->ReadUInt32( nTemp ) ; nDataSize = nTemp; nDataSize+=4; }
+        else if (nOpcode<=0x00fe) { sal_uInt32 nTemp(0); pPict->ReadUInt32(nTemp) ; nDataSize = nTemp; nDataSize+=4; }
         // Osnola: checkme: in the Quickdraw Ref examples ( for pict v2)
         //         0x00ff(EndOfPict) is also not followed by any data...
         else if (nOpcode==0x00ff) { nDataSize=IsVersion2 ? 2 : 0; } // OpEndPic
@@ -1882,7 +1882,7 @@ sal_uInt64 PictReader::ReadData(sal_uInt16 nOpcode)
         else if (nOpcode<=0x7eff) { nDataSize=24; }
         else if (nOpcode<=0x7fff) { nDataSize=254; }
         else if (nOpcode<=0x80ff) { nDataSize=0; }
-        else                      { sal_uInt32 nTemp; pPict->ReadUInt32( nTemp ) ; nDataSize = nTemp; nDataSize+=4; }
+        else                      { sal_uInt32 nTemp(0); pPict->ReadUInt32(nTemp) ; nDataSize = nTemp; nDataSize+=4; }
     }
 
     if (nDataSize==0xffffffff) {


More information about the Libreoffice-commits mailing list