aboutsummaryrefslogtreecommitdiff
path: root/networking/route.c
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-03-06 22:11:45 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-03-06 22:11:45 +0000
commit1aa213a1aeddf67b4ad6c5ac4cb251c861ffeafb (patch)
treee4891420283c085d688683a41cc217dc896917b8 /networking/route.c
parent0ba8ef4bbcca5700238b52efbafbaf72d8e3fd96 (diff)
downloadbusybox-w32-1aa213a1aeddf67b4ad6c5ac4cb251c861ffeafb.tar.gz
busybox-w32-1aa213a1aeddf67b4ad6c5ac4cb251c861ffeafb.tar.bz2
busybox-w32-1aa213a1aeddf67b4ad6c5ac4cb251c861ffeafb.zip
Fix/eliminate use of atol
git-svn-id: svn://busybox.net/trunk/busybox@8598 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'networking/route.c')
-rw-r--r--networking/route.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/networking/route.c b/networking/route.c
index 083149a3d..19942f421 100644
--- a/networking/route.c
+++ b/networking/route.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: route.c,v 1.22 2003/03/19 09:12:39 mjn3 Exp $ 18 * $Id: route.c,v 1.23 2004/03/06 22:11:44 andersen Exp $
19 * 19 *
20 * displayroute() code added by Vladimir N. Oleynik <dzo@simtreas.ru> 20 * displayroute() code added by Vladimir N. Oleynik <dzo@simtreas.ru>
21 * adjustments by Larry Doolittle <LRDoolittle@lbl.gov> 21 * adjustments by Larry Doolittle <LRDoolittle@lbl.gov>
@@ -351,8 +351,7 @@ static int INET6_setroute(int action, int options, char **args)
351 memset(&sa6, 0, sizeof(sa6)); 351 memset(&sa6, 0, sizeof(sa6));
352 } else { 352 } else {
353 if ((cp = strchr(target, '/'))) { 353 if ((cp = strchr(target, '/'))) {
354 prefix_len = atol(cp + 1); 354 if (safe_strtod(cp + 1, &prefix_len) || (prefix_len < 0) || (prefix_len > 128))
355 if ((prefix_len < 0) || (prefix_len > 128))
356 bb_show_usage(); 355 bb_show_usage();
357 *cp = 0; 356 *cp = 0;
358 } else { 357 } else {