Commit 8e09a389 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

make sure the returned pointer is NULL when encoding fails

parent aa3ae018
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);