summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-06-01 09:05:18 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-06-02 18:02:06 +0200
commit3a8eb264b912b76a12af7a94b24b5ac6acc2347d (patch)
treea5080ad10d7353fac7fb8ca24f70ef869fc3736c
parentdde1586c5eebe86deeb1126cde539b3932e2d5a1 (diff)
valgrind: uninitialized read
Change-Id: I29811f652c2368a0fecef66dd02343d12ee67068 Reviewed-on: https://gerrit.libreoffice.org/55178 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--tools/source/generic/color.cxx2
-rw-r--r--vcl/source/gdi/graphictools.cxx3
2 files changed, 2 insertions, 3 deletions
diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx
index 70b388b416f9..a0d409d6e76c 100644
--- a/tools/source/generic/color.cxx
+++ b/tools/source/generic/color.cxx
@@ -206,7 +206,7 @@ OUString Color::AsRGBHexString() const
SvStream& ReadColor( SvStream& rIStream, Color& rColor )
{
- sal_uInt16 nColorName;
+ sal_uInt16 nColorName(0);
rIStream.ReadUInt16( nColorName );
diff --git a/vcl/source/gdi/graphictools.cxx b/vcl/source/gdi/graphictools.cxx
index d8889bb71895..948580cf5123 100644
--- a/vcl/source/gdi/graphictools.cxx
+++ b/vcl/source/gdi/graphictools.cxx
@@ -272,8 +272,7 @@ SvStream& ReadSvtGraphicFill( SvStream& rIStm, SvtGraphicFill& rClass )
rClass.maFillRule = SvtGraphicFill::FillRule( nTmp );
rIStm.ReadUInt16( nTmp );
rClass.maFillType = SvtGraphicFill::FillType( nTmp );
- int i;
- for(i=0; i<SvtGraphicFill::Transform::MatrixSize; ++i)
+ for (int i = 0; i < SvtGraphicFill::Transform::MatrixSize; ++i)
rIStm.ReadDouble( rClass.maFillTransform.matrix[i] );
rIStm.ReadUInt16( nTmp );
rClass.mbTiling = nTmp;