mirror of
https://github.com/curl/curl.git
synced 2024-11-21 01:16:58 +08: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