diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-01-20 09:17:03 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-01-20 11:08:45 +0100 |
commit | 7b37a1a5144a3a4c8b0803b7e2da81e9e108bf66 (patch) | |
tree | 33025af56615d90327f4a9f7c89e53a560f00d24 /lotuswordpro | |
parent | 65c27ed5aa3b5ee6bdc9f1c992428ab31cd0634c (diff) |
ofz: Use-of-uninitialized-value
Change-Id: I6b768b80d972c5379005efecfb803463ca648b4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128644
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpdrawobj.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx index f7bd4f511283..a46d44d1e51f 100644 --- a/lotuswordpro/source/filter/lwpdrawobj.cxx +++ b/lotuswordpro/source/filter/lwpdrawobj.cxx @@ -1372,11 +1372,15 @@ void LwpDrawBitmap::Read() // 20 == length of draw-specific fields. // 14 == length of bmp file header. m_aBmpRec.nFileSize = m_aObjHeader.nRecLen - 20 + 14; - m_pImageData.reset( new sal_uInt8 [m_aBmpRec.nFileSize] ); BmpInfoHeader2 aInfoHeader2; m_pStream->ReadUInt32( aInfoHeader2.nHeaderLen ); + if (!m_pStream->good()) + throw BadRead(); + + m_pImageData.reset( new sal_uInt8 [m_aBmpRec.nFileSize] ); + sal_uInt32 N; sal_uInt32 rgbTableSize; |