diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-01-10 09:49:50 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-01-10 11:56:04 +0100 |
commit | b4c56c0fd917623bbc0982eb53276e6ca64e7f42 (patch) | |
tree | cdf46acd40c09cd8fd111dd1b7a31cc981d9ac9b /lotuswordpro | |
parent | fd9a47981bf8c139a6c6ca962f3b520387019ef3 (diff) |
ofz: Use-of-unintialized-value
Change-Id: I6c9a1a22240defbc8d9fa262ad087770445ffc4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128210
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, 3 insertions, 3 deletions
diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx index 4811c8b8d9cc..877cf4623872 100644 --- a/lotuswordpro/source/filter/lwpdrawobj.cxx +++ b/lotuswordpro/source/filter/lwpdrawobj.cxx @@ -1049,9 +1049,9 @@ void LwpDrawTextBox::Read() sal_Int16 TextLength = m_aObjHeader.nRecLen - 71; if (TextLength < 0) throw BadRead(); - m_aTextRec.pTextString = new sal_uInt8 [TextLength]; - - m_pStream->ReadBytes(m_aTextRec.pTextString, TextLength); + m_aTextRec.pTextString = new sal_uInt8[TextLength]; + if (m_pStream->ReadBytes(m_aTextRec.pTextString, TextLength) != o3tl::make_unsigned(TextLength)) + throw BadRead(); } OUString LwpDrawTextBox::RegisterStyle() |