diff options
author | Denis Vlasenko | 2006-11-27 23:44:57 +0000 |
---|---|---|
committer | Denis Vlasenko | 2006-11-27 23:44:57 +0000 |
commit | 229b3d207216b23a107e4e1ee5584412f6b9318d (patch) | |
tree | d21a19b020f0ff35f7d0fa24f9812d68057ff06a /networking/libiproute/ipaddress.c | |
parent | e2d3ded3549edd58fe3b39f2254c65f0808bcac2 (diff) | |
download | busybox-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.c | 2 |
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); |