summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-08-23 20:15:16 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2021-08-25 14:58:27 +0200
commitf2602462772df03c294b6b979a18fd4f14ea626d (patch)
tree4dcc9d93e4ea21a897737e42b3436f15e5f37d85 /vcl
parentce215eb1e7418ce056f0bfc0ae40d614ac5dbf5e (diff)
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@redhat.com> (cherry picked from commit 8351081be79d0b9d61aae2a6eb328a11e2393c92) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120975 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/igif/gifread.cxx8
1 files changed, 4 insertions, 4 deletions
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;