Merge branch '8.12'

This commit is contained in:
John Cupitt 2021-12-12 10:15:04 +00:00
commit 753c52cdc4
1 changed files with 3 additions and 4 deletions

View File

@ -574,13 +574,12 @@ vips_foreign_load_nsgif_class_init( VipsForeignLoadNsgifClass *class )
static void * static void *
vips_foreign_load_nsgif_bitmap_create( int width, int height ) vips_foreign_load_nsgif_bitmap_create( int width, int height )
{ {
/* Enforce max GIF dimensions of 16383 (0x7FFF). This should be enough /* GIF has a limit of 64k per axis -- double-check this.
* for anyone, and will prevent the worst GIF bombs.
*/ */
if( width <= 0 || if( width <= 0 ||
width > 16383 || width > 65536 ||
height <= 0 || height <= 0 ||
height > 16383 ) { height > 65536 ) {
vips_error( "gifload", vips_error( "gifload",
"%s", _( "bad image dimensions") ); "%s", _( "bad image dimensions") );
return( NULL ); return( NULL );