From 4dc93581d1e4744c115bcde47179036e0541657f Mon Sep 17 00:00:00 2001 From: Ollivier Robert Date: Sun, 18 Jun 2000 23:45:17 +0000 Subject: [PATCH] Bring the ancontrol buffer oflows fixes here too. Submitted by: Aaron Campbell --- usr.sbin/wicontrol/wicontrol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/wicontrol/wicontrol.c b/usr.sbin/wicontrol/wicontrol.c index aef613fb7856..676668ac4089 100644 --- a/usr.sbin/wicontrol/wicontrol.c +++ b/usr.sbin/wicontrol/wicontrol.c @@ -83,7 +83,7 @@ static void wi_getval(iface, wreq) bzero((char *)&ifr, sizeof(ifr)); - strcpy(ifr.ifr_name, iface); + strlcpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)); ifr.ifr_data = (caddr_t)wreq; s = socket(AF_INET, SOCK_DGRAM, 0); @@ -108,7 +108,7 @@ static void wi_setval(iface, wreq) bzero((char *)&ifr, sizeof(ifr)); - strcpy(ifr.ifr_name, iface); + strlcpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)); ifr.ifr_data = (caddr_t)wreq; s = socket(AF_INET, SOCK_DGRAM, 0);