better webp load sanity checking

see d93d9bb43b (r40846309)
This commit is contained in:
John Cupitt 2020-07-23 15:46:53 +01:00
parent 9a88b25aaa
commit 213533e03c

View File

@ -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 );
}