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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Aug 30 14:46:12 UTC 2021


 vcl/source/filter/itiff/ccidecom.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2e9e7438ef958a90d9dce4fe170eeac911ebf782
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 30 12:40:03 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Aug 30 16:45:37 2021 +0200

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

diff --git a/vcl/source/filter/itiff/ccidecom.cxx b/vcl/source/filter/itiff/ccidecom.cxx
index a1dbd8256201..c558fdea7fc9 100644
--- a/vcl/source/filter/itiff/ccidecom.cxx
+++ b/vcl/source/filter/itiff/ccidecom.cxx
@@ -904,7 +904,6 @@ bool CCIDecompressor::Read1DScanlineData(sal_uInt8 * pTarget, sal_uInt16 nBitsTo
 {
     sal_uInt16 nTargetBits = nBitsToRead;
     sal_uInt16 nCode,nCodeBits,nDataBits,nTgtFreeByteBits;
-    sal_uInt8 nByte;
     sal_uInt8 nBlackOrWhite; // is 0xff for black or 0x00 for white
     bool bTerminatingCode;
 
@@ -920,6 +919,7 @@ bool CCIDecompressor::Read1DScanlineData(sal_uInt8 * pTarget, sal_uInt16 nBitsTo
         // fetch next 13 bits into nCodem but don't remove them from
         // the input buffer:
         while (nInputBitsBufSize<13) {
+            sal_uInt8 nByte(0);
             pIStream->ReadUChar( nByte );
             if ( nOptions & CCI_OPTION_INVERSEBITORDER )
                 nByte = pByteSwap[ nByte ];


More information about the Libreoffice-commits mailing list