summaryrefslogtreecommitdiff
path: root/networking/route.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-11-27 23:44:57 +0000
committerDenis Vlasenko2006-11-27 23:44:57 +0000
commit229b3d207216b23a107e4e1ee5584412f6b9318d (patch)
treed21a19b020f0ff35f7d0fa24f9812d68057ff06a /networking/route.c
parente2d3ded3549edd58fe3b39f2254c65f0808bcac2 (diff)
downloadbusybox-229b3d207216b23a107e4e1ee5584412f6b9318d.zip
busybox-229b3d207216b23a107e4e1ee5584412f6b9318d.tar.gz
do not overflow ifr_name. maybe it was safe in some places,
but not everywhere. err to the safe side.
Diffstat (limited to 'networking/route.c')
-rw-r--r--networking/route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/route.c b/networking/route.c
index f343d06..a8926f4 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -422,7 +422,7 @@ static void INET6_setroute(int action, char **args)
if (devname) {
struct ifreq ifr;
memset(&ifr, 0, sizeof(ifr));
- strcpy(ifr.ifr_name, devname);
+ strncpy(ifr.ifr_name, devname, sizeof(ifr.ifr_name));
if (ioctl(skfd, SIOGIFINDEX, &ifr) < 0) {
bb_perror_msg_and_die("SIOGIFINDEX");