summaryrefslogtreecommitdiffstats
path: root/lib/libc/inet/inet_network.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/inet/inet_network.c')
-rw-r--r--lib/libc/inet/inet_network.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/inet/inet_network.c b/lib/libc/inet/inet_network.c
index b464656..254db41 100644
--- a/lib/libc/inet/inet_network.c
+++ b/lib/libc/inet/inet_network.c
@@ -82,9 +82,9 @@ again:
}
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;
}
OpenPOWER on IntegriCloud