On Friday 17 April 2015 12:57:49 Miquel Llobet wrote:
> On Sun, Mar 15, 2015 at 10:42 PM, Giuseppe Scrivano <gscriv...@gnu.org>
> 
> wrote:
> > since there is a reasonable upperbound value, can't we just have
> > something like: "char *hdrval = xmalloc(8192);"?
> 
> Done, I also changed all the resp_header_copy to resp_header_strdup to copy
> the header dinamically. As a result resp_header_copy is now unused, should
> it be deleted as headers have no fixed size?
> 
> I applied my changes on top of Hubert's gethttp single exit point patch, so
> that should go first.

Hi Miquel,

there seem to be memory leaks in your patch. You overwrite the previously 
malloc'ed 'hdrval ' whenever you call resp_header_strdup().

Just stay with Giuseppe's proposal
>> -  char hdrval[512];
>> +  char hdrval[8190];

-> char *hdrval = xmalloc(8192);

Regards, Tim

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to