summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-09-01 11:18:42 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-09-01 17:11:53 +0200
commitec6578f12611546032ec788f7531dfff6eae7bc1 (patch)
tree62d6545ba9faf3372f7736b80956558746d30f4c
parente7d2edb025b0ded69742f5e21786061ffc9f70df (diff)
ofz: MemorySanitizer: use-of-uninitialized-value
Change-Id: I7f37460bd39f5d069550c0e6241fe654f8c910d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121443 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/source/filter/lotus/op.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index 6f79cc5afa24..14f4cf327ed8 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -290,15 +290,12 @@ void OP_Margins(LotusContext& /*rContext*/, SvStream& r, sal_uInt16 n)
void OP_HiddenCols(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/)
{
- sal_uInt16 nByte, nBit;
- SCCOL nCount;
- sal_uInt8 nCurrent;
- nCount = 0;
-
- for( nByte = 0 ; nByte < 32 ; nByte++ ) // 32 Bytes with ...
+ SCCOL nCount = 0;
+ for (sal_uInt16 nByte = 0; nByte < 32; ++nByte) // 32 Bytes with ...
{
- r.ReadUChar( nCurrent );
- for( nBit = 0 ; nBit < 8 ; nBit++ ) // ...each 8 Bits = 256 Bits
+ sal_uInt8 nCurrent(0);
+ r.ReadUChar(nCurrent);
+ for (sal_uInt16 nBit = 0; nBit < 8; ++nBit) // ...each 8 Bits = 256 Bits
{
if( nCurrent & 0x01 ) // is lowest Bit set?
{