fix crash with empty blob metadata
a blob metadata item with length 0 triggered a segv
This commit is contained in:
parent
0c2d7c955a
commit
dac05244f8
@ -228,9 +228,10 @@ vips__b64_decode( const char *buffer, size_t *data_length )
|
||||
{
|
||||
const size_t buffer_length = strlen( buffer );
|
||||
|
||||
/* Worst case.
|
||||
/* Worst case. Add one, since we don't want to return NULL for an empty
|
||||
* input string, it would look like an error return.
|
||||
*/
|
||||
const size_t output_data_length = buffer_length * 3 / 4;
|
||||
const size_t output_data_length = 1 + buffer_length * 3 / 4;
|
||||
|
||||
unsigned char *data;
|
||||
unsigned char *p;
|
||||
|
Loading…
Reference in New Issue
Block a user