Code Review Request for Bug #7089443 (original) (raw)
Darryl Mocek darryl.mocek at oracle.com
Mon Dec 12 22:50:10 UTC 2011
- Previous message: hg: jdk8/tl/jdk: 7118907: InetAddress.isReachable() should return false if sendto fails with EHOSTUNREACH
- Next message: Code Review Request for Bug #7089443
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: hg: jdk8/tl/jdk: 7118907: InetAddress.isReachable() should return false if sendto fails with EHOSTUNREACH
- Next message: Code Review Request for Bug #7089443
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]