summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormaja <maja@openbsd.org>2002-09-07 08:09:49 +0000
committermaja <maja@openbsd.org>2002-09-07 08:09:49 +0000
commitde2af789c192e3380542f989ef0802a18feec62d (patch)
treeb03c268cd51bdea21d13130a100c8e078824ea23
parentpedantic ansify. -moj (diff)
downloadwireguard-openbsd-de2af789c192e3380542f989ef0802a18feec62d.tar.xz
wireguard-openbsd-de2af789c192e3380542f989ef0802a18feec62d.zip
off by one fix from aaron@. -moj
-rw-r--r--usr.sbin/mopd/common/device.c6
-rw-r--r--usr.sbin/mopd/common/pf.c8
2 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/mopd/common/device.c b/usr.sbin/mopd/common/device.c
index ac5a6364054..a58334c2a2b 100644
--- a/usr.sbin/mopd/common/device.c
+++ b/usr.sbin/mopd/common/device.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: device.c,v 1.5 2002/06/10 21:05:25 maja Exp $ */
+/* $OpenBSD: device.c,v 1.6 2002/09/07 08:09:49 maja Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -30,7 +30,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: device.c,v 1.5 2002/06/10 21:05:25 maja Exp $";
+static char rcsid[] = "$OpenBSD: device.c,v 1.6 2002/09/07 08:09:49 maja Exp $";
#endif
#include "os.h"
@@ -109,7 +109,7 @@ deviceOpen(ifname, proto, trans)
struct if_info *p, tmp;
strncpy(tmp.if_name,ifname,sizeof(tmp.if_name) - 1);
- tmp.if_name[sizeof(tmp.if_name)] = 0;
+ tmp.if_name[sizeof(tmp.if_name)-1] = 0;
tmp.iopen = pfInit;
switch (proto) {
diff --git a/usr.sbin/mopd/common/pf.c b/usr.sbin/mopd/common/pf.c
index ee40148832d..cbd4d70e140 100644
--- a/usr.sbin/mopd/common/pf.c
+++ b/usr.sbin/mopd/common/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.5 2002/07/13 10:13:27 deraadt Exp $ */
+/* $OpenBSD: pf.c,v 1.6 2002/09/07 08:09:49 maja Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@@ -34,7 +34,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: pf.c,v 1.5 2002/07/13 10:13:27 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: pf.c,v 1.6 2002/09/07 08:09:49 maja Exp $";
#endif
#include <stdio.h>
@@ -177,7 +177,7 @@ pfAddMulti(s, interface, addr)
int fd;
strncpy(ifr.ifr_name, interface,sizeof(ifr.ifr_name) - 1);
- ifr.ifr_name[sizeof(ifr.ifr_name)] = 0;
+ ifr.ifr_name[sizeof(ifr.ifr_name)-1] = 0;
ifr.ifr_addr.sa_family = AF_UNSPEC;
bcopy(addr, ifr.ifr_addr.sa_data, 6);
@@ -213,7 +213,7 @@ pfDelMulti(s, interface, addr)
int fd;
strncpy(ifr.ifr_name, interface, sizeof (ifr.ifr_name) - 1);
- ifr.ifr_name[sizeof(ifr.ifr_name)] = 0;
+ ifr.ifr_name[sizeof(ifr.ifr_name)-1] = 0;
ifr.ifr_addr.sa_family = AF_UNSPEC;
bcopy(addr, ifr.ifr_addr.sa_data, 6);