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: Tim Ruehsen
Subject: Re: [Bug-wget] [Patch] fix bug #39175 Header value length limited with 256
Date: Mon, 20 Apr 2015 11:32:28 +0200
User-agent: KMail/4.14.2 (Linux/3.16.0-4-amd64; KDE/4.14.2; x86_64; ; )

On Friday 17 April 2015 12:57:49 Miquel Llobet wrote:
> On Sun, Mar 15, 2015 at 10:42 PM, Giuseppe Scrivano <address@hidden>
> 
> 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

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