From 881f34061067c54b6adec913540bc66bdd3de600 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sun, 4 Sep 2016 06:12:35 +0100 Subject: [PATCH] increase size limit for b64 encoded-data we had 1 mb limit, but some large cmyk profiles can bust through that, up it to 10mb --- libvips/iofuncs/base64.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libvips/iofuncs/base64.c b/libvips/iofuncs/base64.c index 6808c616..c972d3f3 100644 --- a/libvips/iofuncs/base64.c +++ b/libvips/iofuncs/base64.c @@ -168,9 +168,11 @@ vips__b64_encode( const unsigned char *data, size_t data_length ) int i; int cursor; - if( output_data_length > 1024 * 1024 ) { + if( output_data_length > 10 * 1024 * 1024 ) { /* We shouldn't really be used for large amounts of data, plus * we are using int offsets. + * + * A large ICC profile can be 1MB, so allow 10MB of b64. */ vips_error( "vips__b64_encode", "%s", _( "too much data" ) ); return( NULL );