aboutsummaryrefslogtreecommitdiff
path: root/inet/inet_net.c
diff options
context:
space:
mode:
Diffstat (limited to 'inet/inet_net.c')
-rw-r--r--inet/inet_net.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/inet/inet_net.c b/inet/inet_net.c
index 1113390..13a8181 100644
--- a/inet/inet_net.c
+++ b/inet/inet_net.c
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
-/* Copyright (C) 2013-2024 Free Software Foundation, Inc.
+/* Copyright (C) 2013-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -69,6 +69,8 @@ again:
if (*cp == 'x' || *cp == 'X')
digit = 0, base = 16, cp++;
while ((c = *cp) != 0) {
+ if (val > 0xff)
+ return (INADDR_NONE);
if (isdigit(c)) {
if (base == 8 && (c == '8' || c == '9'))
return (INADDR_NONE);