summaryrefslogtreecommitdiff
path: root/networking/ether-wake.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-11-27 23:44:57 +0000
committerDenis Vlasenko2006-11-27 23:44:57 +0000
commit229b3d207216b23a107e4e1ee5584412f6b9318d (patch)
treed21a19b020f0ff35f7d0fa24f9812d68057ff06a /networking/ether-wake.c
parente2d3ded3549edd58fe3b39f2254c65f0808bcac2 (diff)
downloadbusybox-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/ether-wake.c')
-rw-r--r--networking/ether-wake.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/ether-wake.c b/networking/ether-wake.c
index f870f6a..e205ffc 100644
--- a/networking/ether-wake.c
+++ b/networking/ether-wake.c
@@ -145,7 +145,7 @@ int ether_wake_main(int argc, char *argv[])
{
struct ifreq if_hwaddr;
- strcpy(if_hwaddr.ifr_name, ifname);
+ strncpy(if_hwaddr.ifr_name, ifname, sizeof(if_hwaddr.ifr_name));
if (ioctl(s, SIOCGIFHWADDR, &if_hwaddr) < 0)
bb_perror_msg_and_die("SIOCGIFHWADDR on %s failed", ifname);