summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-09-02 15:13:16 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-09-02 21:05:10 +0200
commit6d4b78f143f8bea59acd9c62a92effbe6dff0bdf (patch)
tree02863098a31d74c515f60de34aa9c1e9dd01cafe
parent8447f46372f48dc6d259340fafe00d39eabd64cc (diff)
ofz: MemorySanitizer: use-of-uninitialized-value
Change-Id: I5b06808b7b676b9e7cbcea2d9330431c82055d0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121521 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/source/filter/ipict/ipict.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/filter/ipict/ipict.cxx b/vcl/source/filter/ipict/ipict.cxx
index e441603426f2..bcc61870726e 100644
--- a/vcl/source/filter/ipict/ipict.cxx
+++ b/vcl/source/filter/ipict/ipict.cxx
@@ -699,13 +699,13 @@ void PictReader::DrawingMethod(PictDrawingMethod eMethod)
sal_uInt64 PictReader::ReadAndDrawText()
{
- char nByteLen;
- sal_uInt32 nLen, nDataLen;
char sText[256];
- pPict->ReadChar( nByteLen ); nLen=static_cast<sal_uInt32>(nByteLen)&0x000000ff;
- nDataLen = nLen + 1;
- pPict->ReadBytes(&sText, nLen);
+ char nByteLen(0);
+ pPict->ReadChar(nByteLen);
+ sal_uInt32 nLen = static_cast<sal_uInt32>(nByteLen)&0x000000ff;
+ sal_uInt32 nDataLen = nLen + 1;
+ nLen = pPict->ReadBytes(&sText, nLen);
if (IsInvisible( PictDrawingMethod::TEXT )) return nDataLen;
DrawingMethod( PictDrawingMethod::TEXT );