[FFmpeg-cvslog] r23447 - trunk/libavformat/httpauth.c
mstorsjo
subversion
Thu Jun 3 22:31:29 CEST 2010
Author: mstorsjo
Date: Thu Jun 3 22:31:29 2010
New Revision: 23447
Log:
httpauth: Fix the length passed to av_strlcat
Since the buffer always was large enough, this bug didn't have any
effect in practice.
Modified:
trunk/libavformat/httpauth.c
Modified: trunk/libavformat/httpauth.c
==============================================================================
--- trunk/libavformat/httpauth.c Thu Jun 3 22:16:42 2010 (r23446)
+++ trunk/libavformat/httpauth.c Thu Jun 3 22:31:29 2010 (r23447)
@@ -303,7 +303,7 @@ char *ff_http_auth_create_response(HTTPA
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;
More information about the ffmpeg-cvslog
mailing list