It seems that 7089443 is fixed as a by-product of your changes Charles -
provided getnameinfo does the right thing :)
David
------
On 13/12/2011 12:26 PM, Charles Lee wrote:
On 12/13/2011 06:50 AM, Darryl Mocek wrote:
Hello. Please review this patch to fix InetAddress.getLocalHost fails
if the host name is larger HOST_NAME_MAX. The fix is to use strncpy,
and supply the max length the host name can be, instead of using
strcpy. There is no test supplied for this fix as I was unable to set
the host name larger then MAXHOSTNAMELEN on the Linux and Solaris
machines I tried. I tested the fix by adding code to
Inet4AddressImpl.c to simulate a host name larger then MAXHOSTNAMELEN.
Webrev, can be found here:
http://cr.openjdk.java.net/~dmocek/7089443/webrev.00
Thanks,
Darryl
Hi Darryl,
I have changed Inet4AddressImpl.c a lot in the commit:
changeset: 4757:81987765cb81
user: ngmr
date: Fri Nov 11 14:40:18 2011 +0000
summary: 7112670: Inet4AddressImpl should use getaddrinfo/getnameinfo
and you can find the webrev here:
http://cr.openjdk.java.net/~ngmr/ojdk-229/webrev.02/
Would you please use the latest version of Inet4AddressImpl.c ?