Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 2269aee0328d979d9de644b78b94e558 > files > 52

net-tools-1.60-36.mga3.src.rpm

--- net-tools-1.60/nameif.c.ncpy	2006-10-03 14:24:21.000000000 +0200
+++ net-tools-1.60/nameif.c	2006-10-03 14:22:43.000000000 +0200
@@ -100,8 +100,8 @@
 	struct ifreq ifr;
 	opensock(); 
 	memset(&ifr,0,sizeof(struct ifreq));
-	strcpy(ifr.ifr_name, oldname); 
-	strcpy(ifr.ifr_newname, newname); 
+	strncpy(ifr.ifr_name, oldname, IF_NAMESIZE); 
+	strncpy(ifr.ifr_newname, newname, IF_NAMESIZE); 
 	return ioctl(ctl_sk, SIOCSIFNAME, &ifr);
 }