fix heif load fails with 0 length metadata

fixes #1901
This commit is contained in:
Daniel Dennedy 2020-12-07 14:29:10 -08:00 committed by John Cupitt
parent a54cec93ac
commit 21f37037fa
1 changed files with 2 additions and 0 deletions

View File

@ -467,6 +467,8 @@ vips_foreign_load_heif_set_header( VipsForeignLoadHeif *heif, VipsImage *out )
printf( "metadata type = %s, length = %zu\n", type, length );
#endif /*DEBUG*/
if( !length )
continue;
if( !(data = VIPS_ARRAY( out, length, unsigned char )) )
return( -1 );
error = heif_image_handle_get_metadata(