aboutsummaryrefslogtreecommitdiff
path: root/networking/libiproute/ipaddress.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-11-27 23:44:57 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-11-27 23:44:57 +0000
commit229b3d207216b23a107e4e1ee5584412f6b9318d (patch)
treed21a19b020f0ff35f7d0fa24f9812d68057ff06a /networking/libiproute/ipaddress.c
parente2d3ded3549edd58fe3b39f2254c65f0808bcac2 (diff)
downloadbusybox-w32-229b3d207216b23a107e4e1ee5584412f6b9318d.tar.gz
busybox-w32-229b3d207216b23a107e4e1ee5584412f6b9318d.tar.bz2
busybox-w32-229b3d207216b23a107e4e1ee5584412f6b9318d.zip
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 42cf629c6..2a267fef6 100644
--- a/networking/libiproute/ipaddress.c
+++ b/networking/libiproute/ipaddress.c
@@ -86,7 +86,7 @@ static void print_queuelen(char *name)
86 return; 86 return;
87 87
88 memset(&ifr, 0, sizeof(ifr)); 88 memset(&ifr, 0, sizeof(ifr));
89 strcpy(ifr.ifr_name, name); 89 strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
90 if (ioctl(s, SIOCGIFTXQLEN, &ifr) < 0) { 90 if (ioctl(s, SIOCGIFTXQLEN, &ifr) < 0) {
91 perror("SIOCGIFXQLEN"); 91 perror("SIOCGIFXQLEN");
92 close(s); 92 close(s);