summaryrefslogtreecommitdiffstats
path: root/abs/core/net-tools/net-tools-1.60-nameif_strncpy.patch
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/net-tools/net-tools-1.60-nameif_strncpy.patch')
-rw-r--r--abs/core/net-tools/net-tools-1.60-nameif_strncpy.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/abs/core/net-tools/net-tools-1.60-nameif_strncpy.patch b/abs/core/net-tools/net-tools-1.60-nameif_strncpy.patch
new file mode 100644
index 0000000..7568e21
--- /dev/null
+++ b/abs/core/net-tools/net-tools-1.60-nameif_strncpy.patch
@@ -0,0 +1,13 @@
+--- 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);
+ }
+