Merge pull request #1921 from ddennedy-gpsw/fix_heifload_empty_metadata

fix heif load fails with 0 length metadata
This commit is contained in:
John Cupitt 2020-12-10 17:53:39 +00:00 committed by GitHub
commit 0af6929026
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -468,6 +468,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(