Merge branch '8.9'
This commit is contained in:
commit
68f766b482
@ -19,6 +19,7 @@
|
||||
- better gifload behaviour for DISPOSAL_UNSPECIFIED [DarthSim]
|
||||
- ban ppm max_value < 0
|
||||
- add fuzz corpus to dist
|
||||
- detect read errors correctly in source_sniff
|
||||
|
||||
20/6/19 started 8.9.1
|
||||
- don't use the new source loaders for new_from_file or new_from_buffer, it
|
||||
|
@ -1191,7 +1191,7 @@ vips_source_length( VipsSource *source )
|
||||
}
|
||||
|
||||
/**
|
||||
* vips_source_peek:
|
||||
* vips_source_sniff_at_most:
|
||||
* @source: peek this source
|
||||
* @data: return a pointer to the bytes read here
|
||||
* @length: max number of bytes to read
|
||||
@ -1257,13 +1257,13 @@ unsigned char *
|
||||
vips_source_sniff( VipsSource *source, size_t length )
|
||||
{
|
||||
unsigned char *data;
|
||||
size_t bytes_read;
|
||||
gint64 bytes_read;
|
||||
|
||||
if( vips_source_test_features( source ) )
|
||||
return( NULL );
|
||||
|
||||
bytes_read = vips_source_sniff_at_most( source, &data, length );
|
||||
if( bytes_read < length )
|
||||
if( bytes_read < (gint64) length )
|
||||
return( NULL );
|
||||
|
||||
return( data );
|
||||
|
@ -1090,6 +1090,10 @@ vips__seek_no_error( int fd, gint64 pos, int whence )
|
||||
#ifdef OS_WIN32
|
||||
new_pos = _lseeki64( fd, pos, whence );
|
||||
#else /*!OS_WIN32*/
|
||||
/* On error, eg. opening a directory and seeking to the end, lseek()
|
||||
* on linux seems to return 9223372036854775807 ((1 << 63) - 1)
|
||||
* rather than (off_t) -1 for reasons I don't understand.
|
||||
*/
|
||||
new_pos = lseek( fd, pos, whence );
|
||||
#endif /*OS_WIN32*/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user