Re: typo in src/http.c

Hrvoje Niksic <[email protected]>
Newsgroups gmane.comp.web.wget.patches
Message-ID <[email protected]>
Thanks for catching this.  The old check passed the memory debuggers
because it wouldn't cause a crash -- it simply made request's capacity
double with every new added header.

For example:

$ ./wget --header "foo1: bar" --header "foo2: bar" --header "foo3: bar" --header "foo4: bar" --header "foo5: bar" --header "foo6: bar" --header "foo7: bar" --header "foo8: bar" --header "foo9: bar" --header "foo10: bar" --header "foo11: bar" --header "foo12: bar" --header "foo13: bar" --header "foo14: bar" --header "foo15: bar" --header "foo16: bar" --header "foo17: bar" --header "foo18: bar" --header "foo19: bar" --header "foo20: bar" --header "foo21: bar" fly.srk.fer.hr
--22:12:43--  http://fly.srk.fer.hr/
           => `index.html'
wget: realloc: Failed to allocate -1073741824 bytes; memory exhausted.

I've now applied your patch with the following change log:

2005-04-20  FUJISHIMA Satsuki  <[email protected]>

	* http.c (request_set_header): Fix the check whether a new header
	needs to be allocated.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.