mirror of
https://github.com/curl/curl.git
synced 2026-07-26 02:07:16 +03:00
make sure the returned pointer is NULL when encoding fails
This commit is contained in:
parent
aa3ae01878
commit
8e09a389c4
1 changed files with 2 additions and 0 deletions
|
|
@ -132,6 +132,8 @@ size_t Curl_base64_encode(const char *inp, size_t insize, char **outptr)
|
|||
|
||||
char *indata = (char *)inp;
|
||||
|
||||
*outptr = NULL; /* set to NULL in case of failure before we reach the end */
|
||||
|
||||
if(0 == insize)
|
||||
insize = strlen(indata);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue