changeset 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 403c73d966e2
children f23196c73178
files httpauth.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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;