summaryrefslogtreecommitdiffstats
path: root/emfio
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-09-06 08:48:45 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-09-06 12:19:47 +0200
commit885ef9d4d7ab9b725317c96dc09cd3914de47929 (patch)
treef07955a016e4ec72454b7acfa8642f761e038151 /emfio
parentUpdate git submodules (diff)
downloadcore-885ef9d4d7ab9b725317c96dc09cd3914de47929.tar.gz
core-885ef9d4d7ab9b725317c96dc09cd3914de47929.zip
ofz: MemorySanitizer: use-of-uninitialized-value
Change-Id: I4a96b4e687f57ee38686dc03d87ba29de3ec0e98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121708 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'emfio')
-rw-r--r--emfio/source/reader/wmfreader.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
index 8799fab9898e..a32c7f100e04 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -1764,6 +1764,8 @@ namespace emfio
}
}
+ bRecordOk &= pStm->good();
+
SAL_WARN_IF(!bRecordOk, "emfio", "polyline record claimed more points than the stream can provide");
if (!bRecordOk)
@@ -1801,7 +1803,7 @@ namespace emfio
SAL_WARN_IF(!bRecordOk, "emfio", "polypolygon record has more polygons than we can handle");
- bRecordOk = bRecordOk && pStm->good();
+ bRecordOk &= pStm->good();
if (!bRecordOk)
{
@@ -1857,6 +1859,8 @@ namespace emfio
SAL_WARN_IF(!bRecordOk, "emfio", "polyline record claimed more points than the stream can provide");
+ bRecordOk &= pStm->good();
+
if (!bRecordOk)
{
pStm->SetError( SVSTREAM_FILEFORMAT_ERROR );
@@ -1876,7 +1880,7 @@ namespace emfio
case W_META_TEXTOUT:
{
- sal_uInt16 nLength;
+ sal_uInt16 nLength(0);
pStm->ReadUInt16( nLength );
// todo: we also have to take care of the text width
if ( nLength )
@@ -1890,7 +1894,7 @@ namespace emfio
case W_META_EXTTEXTOUT:
{
- sal_uInt16 nLen, nOptions;
+ sal_uInt16 nLen(0), nOptions;
Point aPosition = ReadYX();
pStm->ReadUInt16( nLen ).ReadUInt16( nOptions );
// todo: we also have to take care of the text width
@@ -1942,7 +1946,7 @@ namespace emfio
case W_META_PATBLT:
{
- sal_uInt32 nROP;
+ sal_uInt32 nROP(0);
pStm->ReadUInt32( nROP );
Size aSize = ReadYXExt();
GetWinExtMax( tools::Rectangle( ReadYX(), aSize ), aBound, nMapMode );