summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-09-11 19:38:07 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-09-12 12:17:10 +0200
commit0652bc404c1a8dedda085a4753b412c8c0e9ea6c (patch)
tree9f03e5d58695c812952aef7ee2f45538d417d445 /vcl
parent004dc53f70a3a868815556ae58b044fd0304e1c8 (diff)
ofz: MemorySanitizer: use-of-uninitialized-value
Change-Id: Id142604aca139f0e0a249ba32b6462a2b8db72d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121963 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/ipict/ipict.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/vcl/source/filter/ipict/ipict.cxx b/vcl/source/filter/ipict/ipict.cxx
index cf9b2531e2c6..ca3a7ab0b41a 100644
--- a/vcl/source/filter/ipict/ipict.cxx
+++ b/vcl/source/filter/ipict/ipict.cxx
@@ -492,14 +492,13 @@ sal_uInt64 PictReader::ReadPixPattern(PictReader::Pattern &pattern)
// Here again the attempt to calculate the size of the date to create simple StarView-Styles
// from them. Luckily a PixPattern always contains a normal pattern.
-
sal_uInt64 nDataSize;
- sal_uInt16 nPatType;
- BitmapEx aBMP;
- pPict->ReadUInt16( nPatType );
+ sal_uInt16 nPatType(0);
+ pPict->ReadUInt16(nPatType);
if (nPatType==1) {
pattern.read(*pPict);
+ BitmapEx aBMP;
nDataSize=ReadPixMapEtc(aBMP,false,true,nullptr,nullptr,false,false);
// CHANGEME: use average pixmap colors to update the pattern, ...
if (nDataSize!=0xffffffff) nDataSize+=10;