diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-08-23 19:59:09 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-08-25 14:52:57 +0200 |
commit | 47de9b2acabde7835471d57e165c1228bc07c0d3 (patch) | |
tree | 5baeccfa386055146312c461b96054ccb59e6bd0 /vcl | |
parent | 9ebceed2e50c111655dd64dde6e8306afe1cae84 (diff) |
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@redhat.com>
(cherry picked from commit a620516fbdddc93b85430081e83fe6cecd9f8d12)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120973
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/ipbm/ipbm.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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 ] ) |