diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2004-08-21 06:57:51 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2004-08-21 06:57:51 +0000 |
commit | 39d77751325629f0dea175bce3f3f51059b2ebb6 (patch) | |
tree | 91f5fd7f3ba3881fb6d50c807cfebda3856068d0 /sys | |
parent | 09b62e7161c04fc466d4c1bcd5f28421dd7bdb95 (diff) |
correct bounds checks. found at/by Coverity.
ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet6/in6.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 8091fe9dbe8..10373057a37 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6.c,v 1.57 2004/06/21 23:50:37 tholo Exp $ */ +/* $OpenBSD: in6.c,v 1.58 2004/08/21 06:57:50 tedu Exp $ */ /* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */ /* @@ -2190,7 +2190,7 @@ in6_are_prefix_equal(p1, p2, len) int bytelen, bitlen; /* sanity check */ - if (0 > len || len > 128) { + if (0 > len || len >= 128) { log(LOG_ERR, "in6_are_prefix_equal: invalid prefix length(%d)\n", len); return (0); @@ -2218,7 +2218,7 @@ in6_prefixlen2mask(maskp, len) int bytelen, bitlen, i; /* sanity check */ - if (0 > len || len > 128) { + if (0 > len || len >= 128) { log(LOG_ERR, "in6_prefixlen2mask: invalid prefix length(%d)\n", len); return; |