filter/source/msfilter/svdfppt.cxx |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 94b5ebbe8bb4dd1cadb2d0a305116d7f6df82b24
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Mar 23 20:25:46 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Mar 24 10:27:59 2022 +0100

    ofz: Use-of-uninitialized-value
    
    Change-Id: I469d443b6e3d81c18f1b778882ae4d151c1d0e53
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131992
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index 52136e22ddd1..6e985c877c1c 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -5135,15 +5135,14 @@ void PPTStyleTextPropReader::ReadCharProps( SvStream& 
rIn, PPTCharPropSet& aChar
                                             sal_uInt32& nExtParaFlags, 
sal_uInt16& nBuBlip,
                                             sal_uInt16& nHasAnm, sal_uInt32& 
nAnmScheme )
 {
-    sal_uInt32  nMask = 0; //TODO: nMask initialized here to suppress warning 
for now, see corresponding TODO below
-    sal_uInt16  nDummy16;
-    sal_Int32   nCharsToRead;
-    sal_uInt16  nStringLen = aString.getLength();
+    sal_uInt16 nStringLen = aString.getLength();
 
+    sal_uInt16 nDummy16;
     rIn.ReadUInt16( nDummy16 );
     nCharCount = (rIn.good()) ? nDummy16 : 0;
     rIn.ReadUInt16( nDummy16 );
-    nCharsToRead = nStringLen - ( nCharReadCnt + nCharCount );
+
+    sal_Int32 nCharsToRead = nStringLen - ( nCharReadCnt + nCharCount );
     if ( nCharsToRead < 0 )
     {
         nCharCount = nStringLen - nCharReadCnt;
@@ -5156,6 +5155,7 @@ void PPTStyleTextPropReader::ReadCharProps( SvStream& 
rIn, PPTCharPropSet& aChar
     ImplPPTCharPropSet& aSet = *aCharPropSet.mpImplPPTCharPropSet;
 
     // character attributes
+    sal_uInt32 nMask(0);
     rIn.ReadUInt32( nMask );
     if ( static_cast<sal_uInt16>(nMask) )
     {
@@ -5189,7 +5189,7 @@ void PPTStyleTextPropReader::ReadCharProps( SvStream& 
rIn, PPTCharPropSet& aChar
     }
     if ( nMask & 0x40000 )  // cfColor
     {
-        sal_uInt32 nVal;
+        sal_uInt32 nVal(0);
         rIn.ReadUInt32( nVal );
         if ( !( nVal & 0xff000000 ) )
             nVal = PPT_COLSCHEME_HINTERGRUND;

Reply via email to