From 3c80491daa7bdbcc0070e0c03f4d4b8ae75113a1 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Thu, 3 Jun 2010 20:31:29 +0000 Subject: httpauth: Fix the length passed to av_strlcat Since the buffer always was large enough, this bug didn't have any effect in practice. Originally committed as revision 23447 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/httpauth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/httpauth.c') diff --git a/libavformat/httpauth.c b/libavformat/httpauth.c index abdee81dec..799f84d17a 100644 --- a/libavformat/httpauth.c +++ b/libavformat/httpauth.c @@ -303,7 +303,7 @@ char *ff_http_auth_create_response(HTTPAuthState *state, const char *auth, snprintf(authstr, len, "Authorization: Basic "); ptr = authstr + strlen(authstr); av_base64_encode(ptr, auth_b64_len, auth, strlen(auth)); - av_strlcat(ptr, "\r\n", len); + av_strlcat(ptr, "\r\n", len - (ptr - authstr)); } else if (state->auth_type == HTTP_AUTH_DIGEST) { char *username = av_strdup(auth), *password; -- cgit v1.2.3