diff options
author | Jiri Popelka <jpopelka@redhat.com> | 2011-12-07 18:43:03 +0100 |
---|---|---|
committer | Jiri Popelka <jpopelka@redhat.com> | 2012-01-05 12:22:43 +0100 |
commit | 96b25f189e5b584a1d6ece3a1a81dacb6d53969b (patch) | |
tree | b86eb99e52dd250220b5d81bddaa7dda3cef4ab1 | |
parent | f1f89328cccf92824ab436fa43068603eb43e34d (diff) | |
download | net-tools-96b25f189e5b584a1d6ece3a1a81dacb6d53969b.tar.gz net-tools-96b25f189e5b584a1d6ece3a1a81dacb6d53969b.tar.bz2 net-tools-96b25f189e5b584a1d6ece3a1a81dacb6d53969b.zip |
buffer overflow in arp (RHBZ #164695)
Steps to Reproduce:
1. arp -s 172.16.1.3 00:80:c8:04:05:06 -D eth0
-rw-r--r-- | arp.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -243,7 +243,7 @@ static int arp_getdevhw(char *ifname, struct sockaddr *sa, struct hwtype *hw) struct ifreq ifr; struct hwtype *xhw; - strcpy(ifr.ifr_name, ifname); + strncpy(ifr.ifr_name, ifname, IFNAMSIZ); if (ioctl(sockfd, SIOCGIFHWADDR, &ifr) < 0) { fprintf(stderr, _("arp: cant get HW-Address for `%s': %s.\n"), ifname, strerror(errno)); return (-1); |