aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/basicauth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/basicauth.c')
-rw-r--r--src/microhttpd/basicauth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/microhttpd/basicauth.c b/src/microhttpd/basicauth.c
index 07b124f1..78818a95 100644
--- a/src/microhttpd/basicauth.c
+++ b/src/microhttpd/basicauth.c
@@ -60,7 +60,7 @@ MHD_basic_auth_get_username_password3 (struct MHD_Connection *connection)
60 if ((NULL == params->token68.str) || (0 == params->token68.len)) 60 if ((NULL == params->token68.str) || (0 == params->token68.len))
61 return NULL; 61 return NULL;
62 62
63 decoded_max_len = (params->token68.len / 4) * 3; 63 decoded_max_len = MHD_base64_max_dec_size_ (params->token68.len);
64 ret = (struct MHD_BasicAuthInfo *) malloc (sizeof(struct MHD_BasicAuthInfo) 64 ret = (struct MHD_BasicAuthInfo *) malloc (sizeof(struct MHD_BasicAuthInfo)
65 + decoded_max_len + 1); 65 + decoded_max_len + 1);
66 if (NULL != ret) 66 if (NULL != ret)