On Wed, 26 Sep 2012, Luca Barbato wrote:
On 09/23/2012 12:47 PM, Martin Storsjö wrote:From: Duncan Salerno <[email protected]>--- libavformat/http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/http.c b/libavformat/http.c index 041a9b0..426e859 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -33,7 +33,7 @@ only a subset of it. */ /* used for protocol handling */ -#define BUFFER_SIZE 1024 +#define BUFFER_SIZE 4096 #define MAX_REDIRECTS 8 typedef struct { @@ -377,7 +377,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[4096] = "";why not using BUFFER_SIZE while at it?
It's actually semantically pretty unrelated - BUFFER_SIZE is the size of the IO buffer, while this is a buffer used for constructing headers. But as far as I can see, the URLs aren't really ever written into this buffer, so I don't think changing this is necessary.
char *authstr = NULL, *proxyauthstr = NULL; int64_t off = s->off; int len = 0;Since uri are unbounded what should we decide to reject?
Umm, what do you mean? What arbitrary max size we should choose? The original author of this patch apparently had problems with the limit at 1024 with some odd HLS streams, while 4096 seemed to be enough.
// Martin
_______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
