[Libreoffice-commits] core.git: emfio/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 3 14:51:09 UTC 2021
emfio/source/reader/wmfreader.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit e2dc002db806d76288c79c9acc30911456138289
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Sep 3 09:35:55 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Sep 3 16:50:35 2021 +0200
ofz: MemorySanitizer: use-of-uninitialized-value
Change-Id: I6546ef38c6e84193c00ea5fcac621fdec93e0ab7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121593
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
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;
More information about the Libreoffice-commits
mailing list