Re: [PATCH] daemon.c: fix segfault on OS X

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Disclaimer: if you are offended by constructive criticism, or likely to
answer with insults to the comments I offer, please stop reading this mail
now (and please do not answer my mail, either). :-)

Still with me?  Good.  Nice to meet you.

Just for the record: responding to a patch is my strongest way of saying
that I appreciate your work.

On Sun, 26 Apr 2009, Benjamin Kramer wrote:

> On OS X (and maybe other unices) getaddrinfo(3) returns NULL
> in the ai_canonname field if it is called with an IP address.
> 
> steps to reproduce:
> $ git daemon --export-all
> $ git clone git://127.0.0.1/frotz
> => git daemon's fork (silently) segfaults.
> 
> Remove the pointless loop while at it.

Why is it pointless?  You have to explain why there is no possiblity to 
get multiple addrinfos back.  (And come to think about it, I think it is 
perfectly possible for getaddrinfo to return multiple addresses for the 
same hostname.)

But what is more puzzling to me is what your patch is actually trying to 
do: fix the segfault.  I have to assume -- as you were pretty scarce with 
information on that -- that the ip_address is never set, and that is 
causing the segfault.  Now, with your patch, it seems to me that the 
ip_address will just be the empty string, which is hardly correct.

Am I wrong?

Ciao,
Dscho

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]