blob: aab2024abc7abfe81bdef77d6035892a65a3215c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
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;
}
|