vcl/source/filter/igif/gifread.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit f2602462772df03c294b6b979a18fd4f14ea626d Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Aug 23 20:15:16 2021 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Wed Aug 25 14:58:27 2021 +0200 ofz: MemorySanitizer: use-of-uninitialized-value Change-Id: Iaecbdaa7a7ad61f8c657b0aa04fd30ee27699b72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120924 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit 8351081be79d0b9d61aae2a6eb328a11e2393c92) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120975 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx index 595e5cf18183..fa1270e6a135 100644 --- a/vcl/source/filter/igif/gifread.cxx +++ b/vcl/source/filter/igif/gifread.cxx @@ -256,14 +256,14 @@ bool GIFReader::ReadGlobalHeader() char pBuf[ 7 ]; bool bRet = false; - rIStm.ReadBytes( pBuf, 6 ); - if( NO_PENDING( rIStm ) ) + auto nRead = rIStm.ReadBytes(pBuf, 6); + if (nRead == 6 && NO_PENDING(rIStm)) { pBuf[ 6 ] = 0; if( !strcmp( pBuf, "GIF87a" ) || !strcmp( pBuf, "GIF89a" ) ) { - rIStm.ReadBytes( pBuf, 7 ); - if( NO_PENDING( rIStm ) ) + nRead = rIStm.ReadBytes(pBuf, 7); + if (nRead == 7 && NO_PENDING(rIStm)) { sal_uInt8 nAspect; sal_uInt8 nRF;