diff options
Diffstat (limited to 'net/mopd/files/patch-pf-snit.c')
-rw-r--r-- | net/mopd/files/patch-pf-snit.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/net/mopd/files/patch-pf-snit.c b/net/mopd/files/patch-pf-snit.c new file mode 100644 index 000000000000..b2b329fd3df3 --- /dev/null +++ b/net/mopd/files/patch-pf-snit.c @@ -0,0 +1,22 @@ +--- otherOS/pf-snit.c 1996/09/21 19:12:50 1.2 ++++ otherOS/pf-snit.c 2000/02/20 17:45:34 1.3 +@@ -239,7 +239,8 @@ + struct ifreq ifr; + int fd; + +- strcpy(ifr.ifr_name, interface); ++ strncpy(ifr.ifr_name, interface, sizeof (ifr.ifr_name) -1); ++ ifr.ifr_name[sizeof(ifr.ifr_name) - 1] = 0; + + ifr.ifr_addr.sa_family = AF_UNSPEC; + bcopy(addr, ifr.ifr_addr.sa_data, 6); +@@ -274,7 +275,8 @@ + struct ifreq ifr; + int fd; + +- strcpy(ifr.ifr_name, interface); ++ strncpy(ifr.ifr_name, interface, sizeof (ifr.ifr_name) -1); ++ ifr.ifr_name[sizeof(ifr.ifr_name) - 1] = 0; + + ifr.ifr_addr.sa_family = AF_UNSPEC; + bcopy(addr, ifr.ifr_addr.sa_data, 6); |