Re: FW: buffer size calculation in gethostby_helper()

2011-08-12 Thread Jan Kolar
My final understanding is this: for each of address_count we use (and have to allocate) 1. addrsize_out of bytes in the "string" area of buffer 2. sizeof (char *) of bytes in the h_addr_list area of buffer Logically, For 2., both string_ptr and string_size should be untouched whi

Re: FW: buffer size calculation in gethostby_helper()

2011-08-12 Thread Jan Kolar
My final understanding is this: for each of address_count we use (and have to allocate) 1. addrsize_out of bytes in the "string" area of buffer 2. sizeof (char *) of bytes in the h_addr_list area of buffer Logically, For 1., both string_ptr and string_size should be untouched whi

FW: buffer size calculation in gethostby_helper()

2011-08-12 Thread Pierre A. Humblet
size calculation in gethostby_helper() > -Original Message- > From: Corinna Vinschen > Sent: Friday, August 12, 2011 6:29 AM > > On Aug 12 03:10, Jan Kolar wrote: > > > > Dear Corinna, > > Please note that in net.cc, some kind of > > strin

Re: buffer size calculation in gethostby_helper()

2011-08-12 Thread Corinna Vinschen
On Aug 12 03:10, Jan Kolar wrote: > > Dear Corinna, > Please note that in net.cc, some kind of > string_size += addrsize_out; > is missing somewhere, which affects a buffer allocation. > See the two locations in diff. > [...] > DIFF > $ cd /usr/src/cygwin-1.7.6-1/winsup/ && diff -up

buffer size calculation in gethostby_helper()

2011-08-11 Thread Jan Kolar
Dear Corinna, Please note that in net.cc, some kind of string_size += addrsize_out; is missing somewhere, which affects a buffer allocation. See the two locations in diff. (I do not see well how the two loops (passes) communicate, which might well be the origin of the problem.)