summaryrefslogtreecommitdiff
path: root/sys/netiso
diff options
context:
space:
mode:
authorChad Loder <cloder@cvs.openbsd.org>2003-09-28 23:17:46 +0000
committerChad Loder <cloder@cvs.openbsd.org>2003-09-28 23:17:46 +0000
commit962b98cc3919ea12ffd86bc697aa4e3f505812e1 (patch)
tree05958672c1af6f91bf539cf823eab1b45c2c6b41 /sys/netiso
parentac8974a8de51edc4a7838f60167f279ffe4da0b9 (diff)
Correct off-by-ones with respect to PRC_NCMDS. Mostly from FreeBSD.
OK krw@, deraadt@
Diffstat (limited to 'sys/netiso')
-rw-r--r--sys/netiso/cltp_usrreq.c4
-rw-r--r--sys/netiso/if_eon.c4
-rw-r--r--sys/netiso/tp_iso.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/netiso/cltp_usrreq.c b/sys/netiso/cltp_usrreq.c
index e1cca324c8c..35b4cb750e0 100644
--- a/sys/netiso/cltp_usrreq.c
+++ b/sys/netiso/cltp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cltp_usrreq.c,v 1.4 2003/06/02 23:28:17 millert Exp $ */
+/* $OpenBSD: cltp_usrreq.c,v 1.5 2003/09/28 23:17:45 cloder Exp $ */
/* $NetBSD: cltp_usrreq.c,v 1.9 1996/02/13 22:08:59 christos Exp $ */
/*
@@ -185,7 +185,7 @@ cltp_ctlinput(cmd, sa, dummy)
extern u_char inetctlerrmap[];
struct sockaddr_iso *siso;
- if ((unsigned) cmd > PRC_NCMDS)
+ if ((unsigned) cmd >= PRC_NCMDS)
return;
if (sa->sa_family != AF_ISO && sa->sa_family != AF_CCITT)
return;
diff --git a/sys/netiso/if_eon.c b/sys/netiso/if_eon.c
index 66b5c8f716e..f528387daeb 100644
--- a/sys/netiso/if_eon.c
+++ b/sys/netiso/if_eon.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_eon.c,v 1.20 2003/07/09 22:03:16 itojun Exp $ */
+/* $OpenBSD: if_eon.c,v 1.21 2003/09/28 23:17:45 cloder Exp $ */
/* $NetBSD: if_eon.c,v 1.15 1996/05/09 22:29:37 scottr Exp $ */
/*-
@@ -585,7 +585,7 @@ eonctlinput(cmd, sa, dummy)
}
#endif
- if (cmd < 0 || cmd > PRC_NCMDS)
+ if (cmd < 0 || cmd >= PRC_NCMDS)
return NULL;
IncStat(es_icmp[cmd]);
diff --git a/sys/netiso/tp_iso.c b/sys/netiso/tp_iso.c
index 71a5922952b..72de790e18e 100644
--- a/sys/netiso/tp_iso.c
+++ b/sys/netiso/tp_iso.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tp_iso.c,v 1.6 2003/06/02 23:28:18 millert Exp $ */
+/* $OpenBSD: tp_iso.c,v 1.7 2003/09/28 23:17:45 cloder Exp $ */
/* $NetBSD: tp_iso.c,v 1.8 1996/03/16 23:13:54 christos Exp $ */
/*-
@@ -649,7 +649,7 @@ tpclnp_ctlinput(cmd, saddr, dummy)
}
#endif
- if (cmd < 0 || cmd > PRC_NCMDS)
+ if (cmd < 0 || cmd >= PRC_NCMDS)
return NULL;
if (siso->siso_family != AF_ISO)
return NULL;