correct bounds check
Noticed by: Coverity Prevent analysis tool
This commit is contained in:
parent
7fe25a5726
commit
6c011e4dc3
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user