summaryrefslogtreecommitdiff
path: root/networking/libiproute/ipaddress.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/libiproute/ipaddress.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/libiproute/ipaddress.c')
-rw-r--r--networking/libiproute/ipaddress.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c
index 42cf629..2a267fe 100644
--- a/networking/libiproute/ipaddress.c
+++ b/networking/libiproute/ipaddress.c
@@ -86,7 +86,7 @@ static void print_queuelen(char *name)
return;
memset(&ifr, 0, sizeof(ifr));
- strcpy(ifr.ifr_name, name);
+ strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
if (ioctl(s, SIOCGIFTXQLEN, &ifr) < 0) {
perror("SIOCGIFXQLEN");
close(s);