diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-28 02:44:57 +0300 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-28 02:44:57 +0300 |
commit | 229b3d207216b23a107e4e1ee5584412f6b9318d (patch) | |
tree | d21a19b020f0ff35f7d0fa24f9812d68057ff06a /networking/libiproute/ipaddress.c | |
parent | e2d3ded3549edd58fe3b39f2254c65f0808bcac2 (diff) |
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 42cf629c6..2a267fef6 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); |