Follow-up Comment #5, bug #16509 (project freeciv):

I found an Ubuntu getnameinfo(3) at
http://manpages.ubuntu.com/manpages/maverick/en/man3/getnameinfo.3.html

Further down, it says:



NI_NUMERICHOST
              If  set,  then  the  numeric  form  of the hostname is
returned.
              (When not set, this will still happen in case  the  node's 
name
              cannot be determined.)



If the manual page is correct, then Ubuntu getnameinfo() returns the
numerical address if there is no name. So NI_NAMEREQD would not fix this bug,
because getnameinfo() provides a numerical address, not an empty string.

There is no harm to add NI_NAMEREQD to the code, whether or not it fixes this
bug.

> Do you have an other idea how a connection can get an empty hostname?

* A pointer bug, that drops the name in the wrong buffer?
* A buffer size that is too small? (But this would probably cause a truncated
name instead of an empty name.)
* A bad DNS server that provides "" as name for some address?

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?16509>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to