Mercurial > libavformat.hg
diff httpauth.c @ 6077:54d3a9240339 libavformat
httpauth: Fix the length passed to av_strlcat
Since the buffer always was large enough, this bug didn't have any
effect in practice.
author | mstorsjo |
---|---|
date | Thu, 03 Jun 2010 20:31:29 +0000 |
parents | 201152a121b5 |
children | 4518f83661f4 |
line wrap: on
line diff
--- a/httpauth.c Thu Jun 03 16:51:29 2010 +0000 +++ b/httpauth.c Thu Jun 03 20:31:29 2010 +0000 @@ -303,7 +303,7 @@ 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;