sc/source/filter/qpro/qproform.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
New commits: commit d9dc4071d0d4064449a6bdbfd176445abd97fc86 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Aug 29 14:44:59 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sun Aug 29 17:46:07 2021 +0200 ofz: MemorySanitizer: use-of-uninitialized-value Change-Id: Ic2179724b182262c01b9e5993234b1d89ccbe49f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121224 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/filter/qpro/qproform.cxx b/sc/source/filter/qpro/qproform.cxx index 412528b95937..9ece7da03fc4 100644 --- a/sc/source/filter/qpro/qproform.cxx +++ b/sc/source/filter/qpro/qproform.cxx @@ -189,7 +189,7 @@ do { \ ConvErr QProToSc::Convert( const ScDocument& rDoc, std::unique_ptr<ScTokenArray>& pArray ) { - sal_uInt8 nFmla[ nBufSize ]; + sal_uInt8 nFmla[ nBufSize ] = {0}; sal_uInt8 nArgArray[ nBufSize ] = {0}; sal_Int8 nCol, nPage; sal_uInt16 nIntCount = 0, nStringCount = 0, nFloatCount = 0, nDLLCount = 0, nArgCount = 0; @@ -214,7 +214,6 @@ ConvErr QProToSc::Convert( const ScDocument& rDoc, std::unique_ptr<ScTokenArray> { for( sal_uInt16 i=0; i < nRef; i++) { - nFmla[i] = 0; maIn.ReadUChar( nFmla[i] ); if( nFmla[ i ] == 0x05 ) @@ -338,9 +337,8 @@ ConvErr QProToSc::Convert( const ScDocument& rDoc, std::unique_ptr<ScTokenArray> break; case FT_FuncVar:{ // Sum of a sequence of numbers - sal_uInt8 nArgs; i++; - nArgs = nFmla[ i ]; + sal_uInt8 nArgs = nFmla[ i ]; DoFunc( eOc, nArgs, nullptr ); } break;