diff --git a/sys/security/mac_bsdextended/mac_bsdextended.c b/sys/security/mac_bsdextended/mac_bsdextended.c index 39b3a5951288..512c19adf659 100644 --- a/sys/security/mac_bsdextended/mac_bsdextended.c +++ b/sys/security/mac_bsdextended/mac_bsdextended.c @@ -150,7 +150,7 @@ sysctl_rule(SYSCTL_HANDLER_ARGS) return (EINVAL); index = name[0]; - if (index > MAC_BSDEXTENDED_MAXRULES) + if (index >= MAC_BSDEXTENDED_MAXRULES) return (ENOENT); ruleptr = NULL;