summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-01-12 09:51:30 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-01-13 12:21:20 +0100
commitfb34972b945b73ab86caf8dd3f4d7abb701f2299 (patch)
treecc26325ff00b14bd07d46cf2653d161dc0de29c0
parenttdf#146454 - Check for multiline string in setDataArray (diff)
downloadcore-fb34972b945b73ab86caf8dd3f4d7abb701f2299.tar.gz
core-fb34972b945b73ab86caf8dd3f4d7abb701f2299.zip
ofz#43551 Use-of-uninitialized-value
Change-Id: I2eb139f3bff296cff7d8f0e9a05f19df56b27ecd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128328 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
-rw-r--r--lotuswordpro/source/filter/lwpdrawobj.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx
index 7a1f369cb1d8..abff0b656710 100644
--- a/lotuswordpro/source/filter/lwpdrawobj.cxx
+++ b/lotuswordpro/source/filter/lwpdrawobj.cxx
@@ -1023,6 +1023,7 @@ void LwpDrawTextBox::Read()
m_pStream->ReadInt16( m_aTextRec.nTextHeight );
m_pStream->ReadBytes(m_aTextRec.tmpTextFaceName, DRAW_FACESIZE);
+ m_aTextRec.tmpTextFaceName[DRAW_FACESIZE - 1] = 0;
m_pStream->SeekRel(1);// PitchAndFamily
m_pStream->ReadInt16( m_aTextRec.nTextSize );
@@ -1222,6 +1223,7 @@ void LwpDrawTextArt::Read()
m_pStream->SeekRel(1);
m_pStream->ReadBytes(m_aTextArtRec.tmpTextFaceName, DRAW_FACESIZE);
+ m_aTextArtRec.tmpTextFaceName[DRAW_FACESIZE - 1] = 0;
m_pStream->SeekRel(1);// PitchAndFamily
m_pStream->ReadInt16( m_aTextArtRec.nTextSize );