diff options
| author | Tim J. Robbins <tjr@FreeBSD.org> | 2003-10-22 13:51:46 +0000 |
|---|---|---|
| committer | Tim J. Robbins <tjr@FreeBSD.org> | 2003-10-22 13:51:46 +0000 |
| commit | 5dcb3762e044be0675993baab8f177018b9678d4 (patch) | |
| tree | 3fb4b4282acc6900a52cf6fdeb3ed22cad0d0278 | |
| parent | a13293f19f7400c87ee08b43b4032405b13cb843 (diff) | |
Notes
| -rw-r--r-- | sys/compat/linux/linux_misc.c | 2 | ||||
| -rw-r--r-- | sys/compat/linux/linux_uid16.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 661919ef1a3b..758d882a001d 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -979,7 +979,7 @@ linux_setgroups(struct proc *p, struct linux_setgroups_args *args) if ((error = suser_xxx(oldcred, NULL, PRISON_ROOT)) != 0) return (error); - if (ngrp >= NGROUPS) + if (ngrp < 0 || ngrp >= NGROUPS) return (EINVAL); newcred = crdup(oldcred); diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c index 74fb0568aa47..3f2f3bd098b6 100644 --- a/sys/compat/linux/linux_uid16.c +++ b/sys/compat/linux/linux_uid16.c @@ -111,7 +111,7 @@ linux_setgroups16(struct proc *p, struct linux_setgroups16_args *args) if ((error = suser_xxx(oldcred, NULL, PRISON_ROOT)) != 0) return (error); - if (ngrp >= NGROUPS) + if (ngrp < 0 || ngrp >= NGROUPS) return (EINVAL); newcred = crdup(oldcred); |
