[Libreoffice-commits] core.git: filter/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Sep 22 11:29:10 UTC 2021
filter/source/msfilter/svdfppt.cxx | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
New commits:
commit 454d5f846a8c5b7e87aad6000555b3066c3b4bbf
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Sep 22 10:50:15 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Sep 22 13:28:34 2021 +0200
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 at redhat.com>
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;
More information about the Libreoffice-commits
mailing list