diff --git a/ChangeLog b/ChangeLog index 44227131..fb50c598 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,6 +23,7 @@ - fix build with MSVC - fix a problem with shinkv tail processing [angelmixu] - fix a read one byte beyond buffer bug in jpegload +- make GIF parsing less strict 24/5/19 started 8.8.1 - improve realpath() use on older libc diff --git a/libvips/foreign/gifload.c b/libvips/foreign/gifload.c index a9b7cdc7..da475357 100644 --- a/libvips/foreign/gifload.c +++ b/libvips/foreign/gifload.c @@ -22,11 +22,14 @@ * - init pages to 0 before load * 14/2/19 * - rework as a sequential loader ... simpler, much lower mem use +<<<<<<< HEAD * 6/7/19 [deftomat] * - support array of delays * 24/7/19 * - close early on minimise * - close early on error + * 23/8/18 + * - allow GIF read errors during header scan */ /* @@ -628,10 +631,11 @@ vips_foreign_load_gif_header( VipsForeignLoad *load ) gif->n_pages = 0; do { - if( DGifGetRecordType( gif->file, &record ) == GIF_ERROR ) { - vips_foreign_load_gif_error( gif ); - return( -1 ); - } + /* Don't flag errors during header scan. Some corrupt GIFs + * will fail. + */ + if( DGifGetRecordType( gif->file, &record ) == GIF_ERROR ) + continue; switch( record ) { case IMAGE_DESC_RECORD_TYPE: