revise heif sniffing again

This commit is contained in:
John Cupitt 2020-09-23 21:03:22 +01:00
parent b6276dd44d
commit 8d52c8b761

View File

@ -261,10 +261,12 @@ static int
vips_foreign_load_heif_is_a( const char *buf, int len )
{
if( len >= 12 ) {
const guint chunk_len = GUINT_FROM_BE( *((guint32 *) buf) );
int i;
const guint32 chunk_len = GUINT_FROM_BE( *buf );
if( chunk_len > 32 || chunk_len % 4 != 0 )
if( chunk_len > 32 ||
chunk_len % 4 != 0 )
return( 0 );
for( i = 0; i < VIPS_NUMBER( heif_magic ); i++ )