diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 339c5ff056c..9b2bcd86791 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -835,7 +835,7 @@ kern_setgroups(struct thread *td, u_int ngrp, gid_t *groups) struct ucred *newcred, *oldcred; int error; - MPASS(ngrp <= ngroups_max); + MPASS(ngrp <= ngroups_max + 1); AUDIT_ARG_GROUPSET(groups, ngrp); newcred = crget(); crextend(newcred, ngrp);