diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-09-22 10:50:15 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-09-22 13:28:34 +0200 |
commit | 454d5f846a8c5b7e87aad6000555b3066c3b4bbf (patch) | |
tree | 1d95ca2cf268ab85ce055e1d04809908598ea3c4 | |
parent | 6a20b266a6e2cfc46f4fd03a4955199ed16b5bce (diff) |
ofz: MemorySanitizer: use-of-uninitialized-value
Change-Id: Iaa7f59fbc412f3d5e4d6e4793d7a4459f6a03c8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122424
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 454cac8a0959..93b3f6bd4b33 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -3948,13 +3948,13 @@ void PPTParaSheet::Read( SdrPowerPointImport const & , sal_uInt32 nLevel, bool bFirst ) { // paragraph attributes - sal_uInt16 nVal16; sal_uInt32 nPMask(0); rIn.ReadUInt32(nPMask); sal_uInt16 nMask16 = static_cast<sal_uInt16>(nPMask) & 0xf; if ( nMask16 ) { + sal_uInt16 nVal16(0); rIn.ReadUInt16( nVal16 ); maParaLevel[ nLevel ].mnBuFlags &=~ nMask16; nVal16 &= nMask16; @@ -3966,6 +3966,7 @@ void PPTParaSheet::Read( SdrPowerPointImport const & rIn.ReadUInt16( maParaLevel[ nLevel ].mnBulletFont ); if ( nPMask & 0x0040 ) { + sal_uInt16 nVal16(0); rIn.ReadUInt16( nVal16 ); maParaLevel[ nLevel ].mnBulletHeight = nVal16; } @@ -3978,7 +3979,9 @@ void PPTParaSheet::Read( SdrPowerPointImport const & if ( bFirst ) { if ( nPMask & 0xF00 ) - { // AbsJust! + { + // AbsJust! + sal_uInt16 nVal16(0); rIn.ReadUInt16( nVal16 ); maParaLevel[ nLevel ].mnAdjust = nVal16 & 3; } @@ -3996,6 +3999,7 @@ void PPTParaSheet::Read( SdrPowerPointImport const & rIn.ReadUInt16( maParaLevel[ nLevel ].mnDefaultTab ); if ( nPMask & 0x200000 ) { + sal_uInt16 nVal16; sal_uInt32 nVal32; // number of tabulators rIn.ReadUInt16( nVal16 ); @@ -4005,7 +4009,10 @@ void PPTParaSheet::Read( SdrPowerPointImport const & rIn.ReadUInt32( nVal32 ); // reading the tabulators } if ( nPMask & 0x40000 ) + { + sal_uInt16 nVal16; rIn.ReadUInt16( nVal16 ); + } if ( nPMask & 0x80000 ) rIn.ReadUInt16( maParaLevel[ nLevel ].mnAsianLineBreak ); if ( nPMask & 0x100000 ) @@ -4015,6 +4022,7 @@ void PPTParaSheet::Read( SdrPowerPointImport const & { if ( nPMask & 0x800 ) { + sal_uInt16 nVal16(0); rIn.ReadUInt16( nVal16 ); maParaLevel[ nLevel ].mnAdjust = nVal16 & 3; } @@ -4025,18 +4033,28 @@ void PPTParaSheet::Read( SdrPowerPointImport const & if ( nPMask & 0x4000 ) rIn.ReadUInt16( maParaLevel[ nLevel ].mnLowerDist ); if ( nPMask & 0x8000 ) + { + sal_uInt16 nVal16; rIn.ReadUInt16( nVal16 ); + } if ( nPMask & 0x100 ) rIn.ReadUInt16( maParaLevel[ nLevel ].mnTextOfs ); if ( nPMask & 0x200 ) + { + sal_uInt16 nVal16; rIn.ReadUInt16( nVal16 ); + } if ( nPMask & 0x400 ) rIn.ReadUInt16( maParaLevel[ nLevel ].mnBulletOfs ); if ( nPMask & 0x10000 ) + { + sal_uInt16 nVal16; rIn.ReadUInt16( nVal16 ); + } if ( nPMask & 0xe0000 ) { sal_uInt16 nFlagsToModifyMask = static_cast<sal_uInt16>( ( nPMask >> 17 ) & 7 ); + sal_uInt16 nVal16(0); rIn.ReadUInt16( nVal16 ); // bits that are not involved to zero nVal16 &= nFlagsToModifyMask; @@ -4047,6 +4065,7 @@ void PPTParaSheet::Read( SdrPowerPointImport const & } if ( nPMask & 0x100000 ) { + sal_uInt16 nVal16; sal_uInt32 nVal32; // number of tabulators rIn.ReadUInt16( nVal16 ); @@ -4070,6 +4089,7 @@ void PPTParaSheet::Read( SdrPowerPointImport const & OSL_FAIL( "PPTParaSheet::Read - unknown attribute, send me this document (SJ)" ); } #endif + sal_uInt16 nVal16; rIn.ReadUInt16( nVal16 ); } nPMask >>= 1; |