[Libreoffice-commits] core.git: emfio/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sun Sep 5 09:38:46 UTC 2021


 emfio/source/reader/emfreader.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 740190b972c6f078f8efa1b80f2646b90b7986e6
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Sep 5 09:17:36 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Sep 5 11:38:13 2021 +0200

    ofz: MemorySanitizer: use-of-uninitialized-value
    
    Change-Id: Ib8b337609afa4f588878a1e08eb74fca28fc0534
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121666
    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 52ad30510bf7..f72db2353829 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -2095,7 +2095,7 @@ namespace emfio
                             mpInputStream->ReadUInt32( offBits );
                             mpInputStream->ReadUInt32( cbBits );
 
-                            if ( (cbBits > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBits < cbBmi) )
+                            if ( !mpInputStream->good() || (cbBits > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBits < cbBmi) )
                                bStatus = false;
                             else if ( offBmi )
                             {


More information about the Libreoffice-commits mailing list