correct bounds check

Noticed by:	Coverity Prevent analysis tool
This commit is contained in:
Sam Leffler 2005-03-16 05:11:11 +00:00
parent 7fe25a5726
commit 6c011e4dc3

View File

@ -182,7 +182,7 @@ ip6_init()
if (pr->pr_domain->dom_family == PF_INET6 &&
pr->pr_protocol && pr->pr_protocol != IPPROTO_RAW) {
/* Be careful to only index valid IP protocols. */
if (pr->pr_protocol <= IPPROTO_MAX)
if (pr->pr_protocol < IPPROTO_MAX)
ip6_protox[pr->pr_protocol] = pr - inet6sw;
}