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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Aug 24 07:36:30 UTC 2021


 vcl/source/filter/ipbm/ipbm.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a620516fbdddc93b85430081e83fe6cecd9f8d12
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 23 19:59:09 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Aug 24 09:35:54 2021 +0200

    ofz: MemorySanitizer: use-of-uninitialized-value
    
    Change-Id: Ib020053b30ee7d7c0e335afac68f3a39e891cf2f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120920
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/filter/ipbm/ipbm.cxx b/vcl/source/filter/ipbm/ipbm.cxx
index 7794e611ef4c..87065a81c1ba 100644
--- a/vcl/source/filter/ipbm/ipbm.cxx
+++ b/vcl/source/filter/ipbm/ipbm.cxx
@@ -145,7 +145,7 @@ bool PBMReader::ImplReadHeader()
     bool    bFinished = false;
 
     mrPBM.ReadUChar( nID[ 0 ] ).ReadUChar( nID[ 1 ] );
-    if ( nID[ 0 ] != 'P' )
+    if (!mrPBM.good() || nID[0] != 'P')
         return false;
     mnMaxVal = mnWidth = mnHeight = 0;
     switch ( nID[ 1 ] )


More information about the Libreoffice-commits mailing list