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
This commit is contained in:
Martin Storsjö 2010-06-03 20:31:29 +00:00
parent 76561924cf
commit 3c80491daa
1 changed files with 1 additions and 1 deletions

View File

@ -303,7 +303,7 @@ char *ff_http_auth_create_response(HTTPAuthState *state, const char *auth,
snprintf(authstr, len, "Authorization: Basic "); snprintf(authstr, len, "Authorization: Basic ");
ptr = authstr + strlen(authstr); ptr = authstr + strlen(authstr);
av_base64_encode(ptr, auth_b64_len, auth, strlen(auth)); 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) { } else if (state->auth_type == HTTP_AUTH_DIGEST) {
char *username = av_strdup(auth), *password; char *username = av_strdup(auth), *password;