summaryrefslogtreecommitdiffstats
path: root/sbin/ipfw/ipfw.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/ipfw/ipfw.c')
-rw-r--r--sbin/ipfw/ipfw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/ipfw/ipfw.c b/sbin/ipfw/ipfw.c
index 4a85719..e321a8b 100644
--- a/sbin/ipfw/ipfw.c
+++ b/sbin/ipfw/ipfw.c
@@ -16,7 +16,7 @@
*
* NEW command line interface for IP firewall facility
*
- * $Id$
+ * $Id: ipfw.c,v 1.40 1997/02/22 14:32:36 peter Exp $
*
*/
@@ -739,6 +739,7 @@ add(ac,av)
char *q;
strncpy(rule.fw_via_name, *av, sizeof(rule.fw_via_name));
+ rule.fw_via_name[sizeof(rule.fw_via_name) - 1] = '\0';
for (q = rule.fw_via_name; *q && !isdigit(*q) && *q != '*'; q++)
continue;
if (*q == '*')
@@ -942,6 +943,7 @@ main(ac, av)
FILE *f;
strncpy(progname,*av, sizeof(progname));
+ progname[sizeof(progname) - 1] = '\0';
s = socket( AF_INET, SOCK_RAW, IPPROTO_RAW );
if ( s < 0 ) {
OpenPOWER on IntegriCloud