diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-02-22 12:10:30 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-02-22 12:10:30 +0000 |
commit | 527f70e540b68bcdb338cd5a133bbf17daf0105a (patch) | |
tree | 1baed9cd34c4b5ff16f5c4e850a27325c5d2dbda /tests/server | |
parent | 19f66c757573b4940295a83e08eeb86c878b1def (diff) |
Curl_base64_decode() now returns an allocated buffer
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; } |