make sure the returned pointer is NULL when encoding fails

This commit is contained in:
Daniel Stenberg 2004-05-12 13:23:17 +00:00
parent aa3ae01878
commit 8e09a389c4

View File

@ -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);