lotuswordpro/source/filter/lwpdrawobj.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit b015566e36593c84251f9fe65f259cbe18811074 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Jan 10 09:49:50 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Jan 13 12:40:58 2022 +0100 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 <caol...@redhat.com> (cherry picked from commit b4c56c0fd917623bbc0982eb53276e6ca64e7f42) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128335 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx index abff0b656710..6d6be3748b49 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()