From e4b711a358c3df0dc5b6f7a4a0053c761c9db5ad Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Wed, 23 Sep 2020 08:13:52 +0100 Subject: [PATCH] better heif signature detection --- ChangeLog | 1 + libvips/foreign/heifload.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 34a9525b..fb59284e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ - dzsave in iiif mode could set info.json dimensions off by one [Linden6] - pdfload allows dpi and scale to both be set [le0daniel] - allow gaussblur sigma zero, meaning no blur +- better heif signature detection [lovell] 9/8/20 started 8.10.1 - fix markdown -> xml conversion in doc generation diff --git a/libvips/foreign/heifload.c b/libvips/foreign/heifload.c index a219ee5b..b0be63a2 100644 --- a/libvips/foreign/heifload.c +++ b/libvips/foreign/heifload.c @@ -254,7 +254,7 @@ static const char *heif_magic[] = { * * enum heif_filetype_result result = heif_check_filetype( buf, 12 ); * - * but it's very conservative and seems to be missing some of the Noka hief + * but it's very conservative and seems to be missing some of the Nokia hief * types. */ static int @@ -266,7 +266,8 @@ vips_foreign_load_heif_is_a( const char *buf, int len ) if( len >= 12 ) { int i; - if ( memcmp( buf, iso, 4 ) != 0 && memcmp( buf, three_gp, 4 ) != 0 ) + if( memcmp( buf, iso, 4 ) != 0 && + memcmp( buf, three_gp, 4 ) != 0 ) return ( 0 ); for( i = 0; i < VIPS_NUMBER( heif_magic ); i++ )