raise the PNG text chunk limit
Raise the PNG text chunk limit to 50, since it seems some real images have a text chunk per line of exif data. See https://github.com/libvips/libvips/issues/2433
This commit is contained in:
parent
c5a6331d5e
commit
15416c410d
@ -45,7 +45,9 @@ extern "C" {
|
||||
)
|
||||
#endif /*HAVE_CHECKED_MUL*/
|
||||
|
||||
#define MAX_PNG_TEXT_CHUNKS 20
|
||||
/* We've seen real images with 28 chunks, so set 50.
|
||||
*/
|
||||
#define MAX_PNG_TEXT_CHUNKS 50
|
||||
|
||||
void vips__tiff_init( void );
|
||||
|
||||
|
@ -570,7 +570,8 @@ png2vips_header( Read *read, VipsImage *out )
|
||||
if( !read->unlimited &&
|
||||
num_text > MAX_PNG_TEXT_CHUNKS ) {
|
||||
vips_error( "vipspng",
|
||||
"%s", _( "too many text chunks" ) );
|
||||
_( "%d text chunks, image blocked" ),
|
||||
num_text );
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user