diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-08-30 14:48:47 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-08-31 11:27:14 +0200 |
commit | 4a65109b7ab3cafddad113900754260af2dbb4ea (patch) | |
tree | 8314adb1ad5fcab29433a2cd40fc1b414f0efa3c /starmath | |
parent | f2f8445c9dca13cc343dbfb08a5ab236e25155eb (diff) |
ofz: MemorySanitizer: use-of-uninitialized-value
Change-Id: I9867737be62871aaa80a9ce0b51318afa62e8a67
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121334
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/mathtype.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx index fde2defe51e5..d9306c2402df 100644 --- a/starmath/source/mathtype.cxx +++ b/starmath/source/mathtype.cxx @@ -2660,6 +2660,8 @@ bool MathType::HandleMatrix(int nLevel, sal_uInt8 nSelector, sal_uInt8 nVariatio pS->ReadUChar( nV_just ); pS->ReadUChar( nRows ); pS->ReadUChar( nCols ); + if (!pS->good()) + return false; int nBytes = ((nRows+1)*2)/8; if (((nRows+1)*2)%8) nBytes++; |