We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e4453f8 + 701dcc7 commit c8363d4Copy full SHA for c8363d4
libvips/foreign/nsgifload.c
@@ -534,17 +534,17 @@ vips_foreign_load_nsgif_class_init( VipsForeignLoadNsgifClass *class )
534
static void *
535
vips_foreign_load_nsgif_bitmap_create( int width, int height )
536
{
537
- /* Check GIF dimensions fit within 16-bit unsigned.
+ /* Enforce max GIF dimensions of 16383 (0x7FFF).
538
*/
539
if( width <= 0 ||
540
- width > 65535 ||
+ width > 16383 ||
541
height <= 0 ||
542
- height > 65535 ) {
+ height > 16383 ) {
543
vips_error( "gifload",
544
- "%s", _( "dimensions out of range ") );
+ "%s", _( "bad image dimensions") );
545
return( NULL );
546
}
547
- return g_malloc0( width * height * 4 );
+ return g_malloc0( (gsize) width * height * 4 );
548
549
550
static void
0 commit comments