summaryrefslogtreecommitdiff
path: root/libavformat/httpauth.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/httpauth.c')
-rw-r--r--libavformat/httpauth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/httpauth.c b/libavformat/httpauth.c
index 799f84d17a..47db46b8ac 100644
--- a/libavformat/httpauth.c
+++ b/libavformat/httpauth.c
@@ -294,7 +294,7 @@ char *ff_http_auth_create_response(HTTPAuthState *state, const char *auth,
return NULL;
if (state->auth_type == HTTP_AUTH_BASIC) {
- int auth_b64_len = (strlen(auth) + 2) / 3 * 4 + 1;
+ int auth_b64_len = AV_BASE64_SIZE(strlen(auth));
int len = auth_b64_len + 30;
char *ptr;
authstr = av_malloc(len);