Fix up an assertion in kern_setgroups, it should compare with ngroups_max + 1
Bug introdued in r273685. Noted by: Tiwei Bie <btw mail.ustc.edu.cn>
This commit is contained in:
parent
9d66b6a5a9
commit
b90638866e
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user