diff options
Diffstat (limited to 'networking/ifconfig.c')
-rw-r--r-- | networking/ifconfig.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/networking/ifconfig.c b/networking/ifconfig.c index 9fdab3c3f..341998d8d 100644 --- a/networking/ifconfig.c +++ b/networking/ifconfig.c | |||
@@ -15,7 +15,7 @@ | |||
15 | * Foundation; either version 2 of the License, or (at | 15 | * Foundation; either version 2 of the License, or (at |
16 | * your option) any later version. | 16 | * your option) any later version. |
17 | * | 17 | * |
18 | * $Id: ifconfig.c,v 1.27 2003/11/14 03:04:08 andersen Exp $ | 18 | * $Id: ifconfig.c,v 1.28 2004/03/06 22:11:44 andersen Exp $ |
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | 21 | ||
@@ -394,8 +394,9 @@ int ifconfig_main(int argc, char **argv) | |||
394 | safe_strncpy(host, *argv, (sizeof host)); | 394 | safe_strncpy(host, *argv, (sizeof host)); |
395 | #ifdef CONFIG_FEATURE_IPV6 | 395 | #ifdef CONFIG_FEATURE_IPV6 |
396 | if ((prefix = strchr(host, '/'))) { | 396 | if ((prefix = strchr(host, '/'))) { |
397 | prefix_len = atol(prefix + 1); | 397 | if (safe_strtoi(prefix + 1, &prefix_len) || |
398 | if ((prefix_len < 0) || (prefix_len > 128)) { | 398 | (prefix_len < 0) || (prefix_len > 128)) |
399 | { | ||
399 | ++goterr; | 400 | ++goterr; |
400 | goto LOOP; | 401 | goto LOOP; |
401 | } | 402 | } |