Hi,

I was reading the libares-patch at
http://hurd.dyndns.org/patches/libares.patch yesterday, and found some
code I think is incorrect. One of the lines goes like this

hostname = (char*)realloc(hostname,sizeof(hostname)*2);

The idea - i think - is to realloc() twice the space previously
allocated. Does that work? Isn't sizeof(hostname) always sizeof(char *)
no matter how much allocated space it points to?

I've made a new version of the patch at
http://www.afdelingp.dk/files/patch-libares-1.1.1.diff - I hope it's
useful.

Happy hacking,
Morten

-- 
Morten Poulsen <[EMAIL PROTECTED]>



_______________________________________________
Bug-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-hurd

Reply via email to