[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 24 07:35:54 UTC 2021
vcl/source/filter/igif/gifread.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 8351081be79d0b9d61aae2a6eb328a11e2393c92
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 23 20:15:16 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Aug 24 09:35:19 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 <caolanm at redhat.com>
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;
More information about the Libreoffice-commits
mailing list