Merge pull request #1399 from lovell/webp-verify-dimensions

WebP loader: verify upper limit on dimensions in header
This commit is contained in:
John Cupitt 2019-08-19 23:07:38 +01:00 committed by GitHub
commit 41efe3fb2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -547,7 +547,9 @@ read_header( Read *read, VipsImage *out )
}
if( read->width <= 0 ||
read->height <= 0 ) {
read->height <= 0 ||
read->width > 0x3FFF ||
read->height > 0x3FFF ) {
vips_error( "webp", "%s", _( "bad image dimensions" ) );
return( -1 );
}