Commit 96b25f18 authored by Jiri Popelka's avatar Jiri Popelka

buffer overflow in arp (RHBZ #164695)

Steps to Reproduce:
1. arp -s 172.16.1.3 00:80:c8:04:05:06 -D eth0
parent f1f89328
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment