[Libreoffice-commits] core.git: sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Sep 1 15:12:28 UTC 2021
sc/source/filter/lotus/op.cxx | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
New commits:
commit ec6578f12611546032ec788f7531dfff6eae7bc1
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Sep 1 11:18:42 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Sep 1 17:11:53 2021 +0200
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 at redhat.com>
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?
{
More information about the Libreoffice-commits
mailing list