diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2003-09-22 21:39:41 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2003-09-22 21:39:41 +0000 |
commit | 4085d09b43964c8ebb56763bfe49d52a1ff86b70 (patch) | |
tree | 95c7d5b4e6877de37715da57ee17f461d447d792 /sys/netns | |
parent | ae364d8ea331da992bd261a9abb64af0b7a0d27f (diff) |
Off-by-ones, from aaron@
Diffstat (limited to 'sys/netns')
-rw-r--r-- | sys/netns/ns_input.c | 4 | ||||
-rw-r--r-- | sys/netns/spp_usrreq.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/netns/ns_input.c b/sys/netns/ns_input.c index d63cc9a74f2..efc01c1d6d3 100644 --- a/sys/netns/ns_input.c +++ b/sys/netns/ns_input.c @@ -1,5 +1,5 @@ -/* $OpenBSD: ns_input.c,v 1.4 2003/06/02 23:28:19 millert Exp $ */ +/* $OpenBSD: ns_input.c,v 1.5 2003/09/22 21:39:40 miod Exp $ */ /* $NetBSD: ns_input.c,v 1.9 1996/02/13 22:13:56 christos Exp $ */ /* @@ -262,7 +262,7 @@ idp_ctlinput(cmd, sa, arg) struct ns_errp *errp = NULL; int type; - if (cmd < 0 || cmd > PRC_NCMDS) + if (cmd < 0 || cmd >= PRC_NCMDS) return NULL; if (nsctlerrmap[cmd] == 0) return NULL; /* XXX */ diff --git a/sys/netns/spp_usrreq.c b/sys/netns/spp_usrreq.c index 49c256df2e1..5728a4129bb 100644 --- a/sys/netns/spp_usrreq.c +++ b/sys/netns/spp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spp_usrreq.c,v 1.15 2003/06/02 23:28:19 millert Exp $ */ +/* $OpenBSD: spp_usrreq.c,v 1.16 2003/09/22 21:39:40 miod Exp $ */ /* $NetBSD: spp_usrreq.c,v 1.9 1996/02/13 22:14:13 christos Exp $ */ /* @@ -596,7 +596,7 @@ spp_ctlinput(cmd, sa, arg) struct sockaddr_ns *sns; int type; - if (cmd < 0 || cmd > PRC_NCMDS) + if (cmd < 0 || cmd >= PRC_NCMDS) return NULL; type = NS_ERR_UNREACH_HOST; |