summaryrefslogtreecommitdiff
path: root/libavformat/httpauth.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2010-06-03 20:31:29 +0000
committerMartin Storsjö <martin@martin.st>2010-06-03 20:31:29 +0000
commit3c80491daa7bdbcc0070e0c03f4d4b8ae75113a1 (patch)
treebdb769fe6e4e5579492e8b98e5acb3e340d0b207 /libavformat/httpauth.c
parent76561924cf3d9789653dc72d696f119862616891 (diff)
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
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 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;