diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-09-01 17:09:50 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-09-03 12:04:41 +0200 |
commit | b6e5aca3b35df4b0fd05f449435bb69bd0cea164 (patch) | |
tree | 82ec15521d7ed426e8468e363fe5d664b5330efb /emfio | |
parent | c06bc8cf1b3e1057eb846605b61570bb1f3713da (diff) |
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@redhat.com>
Diffstat (limited to 'emfio')
-rw-r--r-- | emfio/source/reader/emfreader.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
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; |