diff --git a/libvips/foreign/webp2vips.c b/libvips/foreign/webp2vips.c index 20873dfc..bb2b6c48 100644 --- a/libvips/foreign/webp2vips.c +++ b/libvips/foreign/webp2vips.c @@ -511,7 +511,11 @@ read_header( Read *read, VipsImage *out ) if( read->width <= 0 || read->height <= 0 || read->width > 0x3FFF || - read->height > VIPS_MAX_COORD ) { + read->height > VIPS_MAX_COORD || + read->frame_width <= 0 || + read->frame_height <= 0 || + read->frame_width > 0x3FFF || + read->frame_height > 0x3FFF ) { vips_error( "webp", "%s", _( "bad image dimensions" ) ); return( -1 ); }