diff options
Diffstat (limited to 'tests/server')
-rw-r--r-- | tests/server/getpart.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/server/getpart.c b/tests/server/getpart.c index 45576fafd..fa0f9cf52 100644 --- a/tests/server/getpart.c +++ b/tests/server/getpart.c @@ -61,11 +61,11 @@ char *appendstring(char *string, /* original string */ { size_t len = strlen(buffer); size_t needed_len = len + *stringlen + 1; - char buf64[256]; /* big enough? */ + unsigned char *buf64=NULL; if(base64) { /* decode the given buffer first */ - len = Curl_base64_decode(buffer, buf64); /* updated len */ + len = Curl_base64_decode(buffer, &buf64); /* updated len */ buffer = buf64; needed_len = len + *stringlen + 1; /* recalculate */ } @@ -87,6 +87,9 @@ char *appendstring(char *string, /* original string */ *stringlen += len; string[*stringlen]=0; + if(buf64) + free(buf64); + return string; } |