bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] [Patch] fix bug #39175 Header value length limited with 2


From: Giuseppe Scrivano
Subject: Re: [Bug-wget] [Patch] fix bug #39175 Header value length limited with 256
Date: Sat, 14 Mar 2015 13:16:09 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Miquel Llobet <address@hidden> writes:

> Increased the header buffer to 8Kb, as there are no limits to the size of
> field name, values or headers themselves. While the current value is big
> enough, other projects such as Apache [1] or nginx have limits of 4-8Kb.
>
> If we want to allow for arbitrary size headers we should use
> resp_header_strdup instead of resp_header_copy, but this new value should
> be enough.
>
> --- src/http.c.orig 2015-03-12 21:50:03.000000000 +0100
> +++ src/http.c 2015-03-12 21:04:08.000000000 +0100
> @@ -1695,7 +1695,7 @@
>
>    char *head;
>    struct response *resp;
> -  char hdrval[512];
> +  char hdrval[8190];

Thanks for your contribution!

Using a 8Kb buffer on the stack should be fine but I am not sure how
many other buffers we are already allocating this way and how deep the
stack will get.  Could this be dinamically allocated?

Also, please use a ChangeLog style for the commit message, take a look
at the latest commit on the git repository to have an idea of how it
should look.

Giuseppe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]