Index: lib/libc/inet/inet_network.c
===================================================================
RCS file: /home/ncvs/src/lib/libc/inet/inet_network.c,v
retrieving revision 1.4
diff -u -u -r1.4 inet_network.c
--- lib/libc/inet/inet_network.c	3 Jun 2007 17:20:26 -0000	1.4
+++ lib/libc/inet/inet_network.c	6 Jan 2008 15:38:28 -0000
@@ -82,9 +82,9 @@
 	}
 	if (!digit)
 		return (INADDR_NONE);
+	if (pp >= parts + 4 || val > 0xffU)
+		return (INADDR_NONE);
 	if (*cp == '.') {
-		if (pp >= parts + 4 || val > 0xffU)
-			return (INADDR_NONE);
 		*pp++ = val, cp++;
 		goto again;
 	}
