diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-05-12 13:23:17 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-05-12 13:23:17 +0000 |
commit | 8e09a389c49486031f19535ff041387380b38403 (patch) | |
tree | e08b545bdcd483ea0b39d6e5b8703b9f9cb5b4cd /lib/base64.c | |
parent | aa3ae01878b3178e593af6f9206ef3874de7b91c (diff) | |
download | curl-8e09a389c49486031f19535ff041387380b38403.tar.gz |
make sure the returned pointer is NULL when encoding fails
Diffstat (limited to 'lib/base64.c')
-rw-r--r-- | lib/base64.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/base64.c b/lib/base64.c index 70e5e5cc2..987835b4f 100644 --- a/lib/base64.c +++ b/lib/base64.c @@ -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); |