[Libreoffice-commits] core.git: emfio/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 3 10:05:14 UTC 2021
emfio/source/reader/emfreader.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit b6e5aca3b35df4b0fd05f449435bb69bd0cea164
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Sep 1 17:09:50 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Sep 3 12:04:41 2021 +0200
ofz: MemorySanitizer: use-of-uninitialized-value
Change-Id: I71d3b07c7ca2467b7bc1db5350dbdeb1f8910cb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121478
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx
index 45e50a90d7d4..758a3220d517 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -1511,7 +1511,9 @@ namespace emfio
mpInputStream->ReadUInt32( BkColorSrc ).ReadUInt32( iUsageSrc ).ReadUInt32( offBmiSrc ).ReadUInt32( cbBmiSrc )
.ReadUInt32( offBitsSrc ).ReadUInt32( cbBitsSrc ).ReadInt32( cxSrc ).ReadInt32( cySrc ) ;
- if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) ||
+ if ( !mpInputStream->good() ||
+ (cbBitsSrc > (SAL_MAX_UINT32 - 14)) ||
+ ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) ||
cxDest == SAL_MAX_INT32 || cyDest == SAL_MAX_INT32 )
{
bStatus = false;
More information about the Libreoffice-commits
mailing list