projects
/
platform
/
upstream
/
net-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1f8932
)
buffer overflow in arp (RHBZ #164695)
author
Jiri Popelka
<jpopelka@redhat.com>
Wed, 7 Dec 2011 17:43:03 +0000
(18:43 +0100)
committer
Jiri Popelka
<jpopelka@redhat.com>
Thu, 5 Jan 2012 11:22:43 +0000
(12:22 +0100)
Steps to Reproduce:
1. arp -s 172.16.1.3 00:80:c8:04:05:06 -D eth0
arp.c
patch
|
blob
|
history
diff --git
a/arp.c
b/arp.c
index
8a376ec
..
72e87d6
100644
(file)
--- a/
arp.c
+++ b/
arp.c
@@
-243,7
+243,7
@@
static int arp_getdevhw(char *ifname, struct sockaddr *sa, struct hwtype *hw)
struct ifreq ifr;
struct hwtype *xhw;
- str
cpy(ifr.ifr_name, ifname
);
+ str
ncpy(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);