http: Use a constant for the supported header size
authorLuca Barbato <lu_zero@gentoo.org>
Tue, 22 Jul 2014 14:37:09 +0000 (16:37 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Tue, 22 Jul 2014 14:38:26 +0000 (16:38 +0200)
libavformat/http.c
libavformat/http.h

index 6c390e8..d7f6029 100644 (file)
@@ -529,7 +529,7 @@ static int http_connect(URLContext *h, const char *path, const char *local_path,
 {
     HTTPContext *s = h->priv_data;
     int post, err;
-    char headers[1024] = "";
+    char headers[HTTP_HEADERS_SIZE] = "";
     char *authstr = NULL, *proxyauthstr = NULL;
     int64_t off = s->off;
     int len = 0;
index f0d9d4a..3d301a7 100644 (file)
@@ -24,6 +24,8 @@
 
 #include "url.h"
 
+#define HTTP_HEADERS_SIZE 1024
+
 /**
  * Initialize the authentication state based on another HTTP URLContext.
  * This can be used to pre-initialize the authentication parameters if