summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-08-29 14:44:59 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-08-29 17:46:07 +0200
commitd9dc4071d0d4064449a6bdbfd176445abd97fc86 (patch)
treed7429e12c1949a4fe580caad6ae343a658cbc899 /sc/source
parent11f430fd5d6b866483c8bde646f3ef2746e980c0 (diff)
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 <caolanm@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/filter/qpro/qproform.cxx6
1 files changed, 2 insertions, 4 deletions
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;