Merge branch '8.10'

This commit is contained in:
John Cupitt 2020-11-20 13:46:59 +00:00
commit e8660a7426
1 changed files with 4 additions and 2 deletions

View File

@ -367,9 +367,11 @@ vips_giflib_read( GifFileType *file, GifByteType *buf, int n )
gint64 bytes_read; gint64 bytes_read;
bytes_read = vips_source_read( gif->source, buf, n ); bytes_read = vips_source_read( gif->source, buf, n );
if( bytes_read == 0 ) if( bytes_read == 0 ) {
gif->eof = TRUE; gif->eof = TRUE;
if( bytes_read <= 0 ) return( -1 );
}
if( bytes_read < 0 )
return( -1 ); return( -1 );
if( bytes_read > INT_MAX ) if( bytes_read > INT_MAX )
return( -1 ); return( -1 );