revise heif sniffing again
This commit is contained in:
parent
b6276dd44d
commit
8d52c8b761
@ -261,11 +261,13 @@ static int
|
|||||||
vips_foreign_load_heif_is_a( const char *buf, int len )
|
vips_foreign_load_heif_is_a( const char *buf, int len )
|
||||||
{
|
{
|
||||||
if( len >= 12 ) {
|
if( len >= 12 ) {
|
||||||
|
const guint chunk_len = GUINT_FROM_BE( *((guint32 *) buf) );
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
const guint32 chunk_len = GUINT_FROM_BE( *buf );
|
if( chunk_len > 32 ||
|
||||||
if( chunk_len > 32 || chunk_len % 4 != 0 )
|
chunk_len % 4 != 0 )
|
||||||
return ( 0 );
|
return( 0 );
|
||||||
|
|
||||||
for( i = 0; i < VIPS_NUMBER( heif_magic ); i++ )
|
for( i = 0; i < VIPS_NUMBER( heif_magic ); i++ )
|
||||||
if( strncmp( buf + 4, heif_magic[i], 8 ) == 0 )
|
if( strncmp( buf + 4, heif_magic[i], 8 ) == 0 )
|
||||||
|
Loading…
Reference in New Issue
Block a user