diff options
author | Chad Loder <cloder@cvs.openbsd.org> | 2003-09-28 23:17:46 +0000 |
---|---|---|
committer | Chad Loder <cloder@cvs.openbsd.org> | 2003-09-28 23:17:46 +0000 |
commit | 962b98cc3919ea12ffd86bc697aa4e3f505812e1 (patch) | |
tree | 05958672c1af6f91bf539cf823eab1b45c2c6b41 /sys/netipx | |
parent | ac8974a8de51edc4a7838f60167f279ffe4da0b9 (diff) |
Correct off-by-ones with respect to PRC_NCMDS. Mostly from FreeBSD.
OK krw@, deraadt@
Diffstat (limited to 'sys/netipx')
-rw-r--r-- | sys/netipx/ipx_input.c | 4 | ||||
-rw-r--r-- | sys/netipx/spx_usrreq.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/netipx/ipx_input.c b/sys/netipx/ipx_input.c index d290cd85703..7f187e58962 100644 --- a/sys/netipx/ipx_input.c +++ b/sys/netipx/ipx_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipx_input.c,v 1.15 2003/06/02 23:28:16 millert Exp $ */ +/* $OpenBSD: ipx_input.c,v 1.16 2003/09/28 23:17:45 cloder Exp $ */ /*- * @@ -280,7 +280,7 @@ ipx_ctlinput(cmd, arg_as_sa, dummy) caddr_t arg = (/* XXX */ caddr_t)arg_as_sa; struct ipx_addr *ipx; - if (cmd < 0 || cmd > PRC_NCMDS) + if (cmd < 0 || cmd >= PRC_NCMDS) return NULL; switch (cmd) { struct sockaddr_ipx *sipx; diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c index 559a27642e7..16f21e8fc65 100644 --- a/sys/netipx/spx_usrreq.c +++ b/sys/netipx/spx_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spx_usrreq.c,v 1.20 2003/06/02 23:28:16 millert Exp $ */ +/* $OpenBSD: spx_usrreq.c,v 1.21 2003/09/28 23:17:45 cloder Exp $ */ /*- * @@ -612,7 +612,7 @@ spx_ctlinput(cmd, arg_as_sa, dummy) struct ipx_addr *na; struct sockaddr_ipx *sipx; - if (cmd < 0 || cmd > PRC_NCMDS) + if (cmd < 0 || cmd >= PRC_NCMDS) return NULL; switch (cmd) { |