Skip to content
Snippets Groups Projects
Commit 8e09a389 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

make sure the returned pointer is NULL when encoding fails

parent aa3ae018
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment