7078386: NetworkInterface.getNetworkInterfaces() may return corrupted results on linux
authormichaelm
Wed, 21 Dec 2011 10:06:32 +0000
changeset 11355 c2cb710f1bdd
parent 11354 f3df233a300e
child 11356 898d37526be1
7078386: NetworkInterface.getNetworkInterfaces() may return corrupted results on linux Reviewed-by: michaelm, alanb, chegar Contributed-by: brandon.passanisi@oracle.com
jdk/src/solaris/native/java/net/NetworkInterface.c
--- a/jdk/src/solaris/native/java/net/NetworkInterface.c	Wed Dec 21 17:09:39 2011 +0900
+++ b/jdk/src/solaris/native/java/net/NetworkInterface.c	Wed Dec 21 10:06:32 2011 +0000
@@ -1109,7 +1109,7 @@
     uint8_t ipv6addr[16];
 
     if ((f = fopen(_PATH_PROCNET_IFINET6, "r")) != NULL) {
-        while (fscanf(f, "%4s%4s%4s%4s%4s%4s%4s%4s %02x %02x %02x %02x %20s\n",
+        while (fscanf(f, "%4s%4s%4s%4s%4s%4s%4s%4s %08x %02x %02x %02x %20s\n",
                          addr6p[0], addr6p[1], addr6p[2], addr6p[3], addr6p[4], addr6p[5], addr6p[6], addr6p[7],
                          &if_idx, &plen, &scope, &dad_status, devname) != EOF) {