Swap size_t with gint64 to catch read errors (#2811)

This is similar to commit 5221df224f.
This commit is contained in:
Kleis Auke Wolthuizen 2022-05-17 23:04:20 +02:00 committed by GitHub
parent 683e8d9b6f
commit f1b4b0cb1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -422,7 +422,7 @@ static int
vips_foreign_load_matrix_source_is_a_source( VipsSource *source )
{
unsigned char *data;
size_t bytes_read;
gint64 bytes_read;
char line[80];
int width;
int height;

View File

@ -664,7 +664,7 @@ gboolean
vips_foreign_load_svg_source_is_a_source( VipsSource *source )
{
unsigned char *data;
size_t bytes_read;
gint64 bytes_read;
if( (bytes_read = vips_source_sniff_at_most( source,
&data, SVG_HEADER_SIZE )) <= 0 )