summaryrefslogtreecommitdiff
path: root/emfio
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-09-03 09:35:55 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-09-03 16:50:35 +0200
commite2dc002db806d76288c79c9acc30911456138289 (patch)
tree8cc89e821a4e99dd00406366aa38ae81bbbc330d /emfio
parentaeccf731466bc44ce750bbeb8a86ccf309a12027 (diff)
ofz: MemorySanitizer: use-of-uninitialized-value
Change-Id: I6546ef38c6e84193c00ea5fcac621fdec93e0ab7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121593 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'emfio')
-rw-r--r--emfio/source/reader/wmfreader.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
index 5c8a4d095a39..7f664aaa63ec 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -826,7 +826,7 @@ namespace emfio
mpInputStream->ReadInt16( nBitmapType ).ReadInt16( nWidth ).ReadInt16( nHeight ).ReadInt16( nBytesPerScan ).ReadUChar( nPlanes ).ReadUChar( nBitCount );
SAL_INFO("emfio", "\t\t Bitmap type:" << nBitmapType << " Width:" << nWidth << " Height:" << nHeight << " WidthBytes:" << nBytesPerScan << " Planes: " << static_cast< sal_uInt16 >( nPlanes ) << " BitCount: " << static_cast< sal_uInt16 >( nBitCount ) );
- if ( bNoSourceBitmap || ( nBitCount == 4 ) || ( nBitCount == 8 ) || nPlanes != 1 )
+ if (!mpInputStream->good() || bNoSourceBitmap || nBitCount == 4 || nBitCount == 8 || nPlanes != 1)
{
SAL_WARN("emfio", "\t\t TODO The unsupported Bitmap record. Please fill a bug.");
break;