summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-08-30 15:59:44 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-08-31 14:44:50 +0200
commite822d5590e48a1100717b5d0ae2b6d72f4f936da (patch)
treeedd8d0caeed5c0b272270b855c2275501fbe208a /vcl
parent2053a545413e788f6d3fb74e0335f8f2d354a0cc (diff)
ofz: MemorySanitizer: use-of-uninitialized-value
Change-Id: Iaeae1efd2da2add9729bab38137c8ff1fb9818db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121362 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/graphicfilter.cxx2
-rw-r--r--vcl/source/filter/graphicfilter2.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index d7848b83a8bb..3ff7de43e2fb 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -924,7 +924,7 @@ Graphic GraphicFilter::ImportUnloadedGraphic(SvStream& rIStream, sal_uInt64 size
if (nStatus == ERRCODE_NONE)
{
rIStream.Seek(nStreamBegin);
- rIStream.ReadBytes(pGraphicContent.get(), nGraphicContentSize);
+ nGraphicContentSize = rIStream.ReadBytes(pGraphicContent.get(), nGraphicContentSize);
}
}
}
diff --git a/vcl/source/filter/graphicfilter2.cxx b/vcl/source/filter/graphicfilter2.cxx
index 5666497ce08f..0360c51d3347 100644
--- a/vcl/source/filter/graphicfilter2.cxx
+++ b/vcl/source/filter/graphicfilter2.cxx
@@ -593,7 +593,7 @@ bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, bool bExtendedInfo )
// read up to the start of the image
rStm.ReadUInt32( nLen32 );
rStm.ReadUInt32( nTemp32 );
- while( ( nTemp32 != 0x49444154 ) && rStm.good() )
+ while (rStm.good() && nTemp32 != 0x49444154)
{
if ( nTemp32 == 0x70485973 ) // physical pixel dimensions
{