diff options
Diffstat (limited to 'net/mopd/files/patch-otherOS_pf-snit.c')
-rw-r--r-- | net/mopd/files/patch-otherOS_pf-snit.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/net/mopd/files/patch-otherOS_pf-snit.c b/net/mopd/files/patch-otherOS_pf-snit.c new file mode 100644 index 000000000000..d54c2071c109 --- /dev/null +++ b/net/mopd/files/patch-otherOS_pf-snit.c @@ -0,0 +1,22 @@ +--- otherOS/pf-snit.c.orig 1996-08-08 11:48:50 UTC ++++ otherOS/pf-snit.c +@@ -237,7 +237,8 @@ pfAddMulti(s, interface, addr) + 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); +@@ -272,7 +273,8 @@ char *interface, *addr; + 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); |