summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-01-10 09:49:50 +0000
committerMichael Stahl <michael.stahl@allotropia.de>2022-01-13 11:29:16 +0100
commit0b6ae07240e79738d88fe61676f814044cf71c7c (patch)
tree64d9700ba8ab1af45c7540a2992eb39cecb0273c
parentbump product version to 7.3.1.0.0+ (diff)
downloadcore-0b6ae07240e79738d88fe61676f814044cf71c7c.tar.gz
core-0b6ae07240e79738d88fe61676f814044cf71c7c.zip
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> (cherry picked from commit b4c56c0fd917623bbc0982eb53276e6ca64e7f42) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128334 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r--lotuswordpro/source/filter/lwpdrawobj.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx
index 04acb795e631..a12bfa270a40 100644
--- a/lotuswordpro/source/filter/lwpdrawobj.cxx
+++ b/lotuswordpro/source/filter/lwpdrawobj.cxx
@@ -1050,9 +1050,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()