diff --git a/libavformat/http.c b/libavformat/http.c index 2bac935e8c..567ce80021 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -658,7 +658,7 @@ static int http_connect(URLContext *h, const char *path, const char *local_path, { HTTPContext *s = h->priv_data; int post, err; - char headers[4096] = ""; + char headers[HTTP_HEADERS_SIZE] = ""; char *authstr = NULL, *proxyauthstr = NULL; int64_t off = s->off; int len = 0; diff --git a/libavformat/http.h b/libavformat/http.h index a19ad8ed3e..be8ae7f460 100644 --- a/libavformat/http.h +++ b/libavformat/http.h @@ -24,6 +24,8 @@ #include "url.h" +#define HTTP_HEADERS_SIZE 4096 + /** * Initialize the authentication state based on another HTTP URLContext. * This can be used to pre-initialize the authentication parameters if