mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
make sure the returned pointer is NULL when encoding fails
This commit is contained in:
parent
aa3ae01878
commit
8e09a389c4
@ -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…
Reference in New Issue
Block a user