aboutsummaryrefslogtreecommitdiff
path: root/sys/compat
diff options
context:
space:
mode:
authorTim J. Robbins <tjr@FreeBSD.org>2003-10-21 11:00:33 +0000
committerTim J. Robbins <tjr@FreeBSD.org>2003-10-21 11:00:33 +0000
commit1d2d5501f9e755fd598c07a731a425320d160d8f (patch)
treef53aed1acdd4b2683ac1f22d7277e9a5b5fc44cb /sys/compat
parentc3093074c4e32dd6fe86f756d18ec1e2135ef003 (diff)
Notes
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linux/linux_misc.c2
-rw-r--r--sys/compat/linux/linux_uid16.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index f271482032fe..56b20f33c21c 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -989,7 +989,7 @@ linux_setgroups(struct thread *td, struct linux_setgroups_args *args)
struct proc *p;
ngrp = args->gidsetsize;
- if (ngrp >= NGROUPS)
+ if (ngrp < 0 || ngrp >= NGROUPS)
return (EINVAL);
error = copyin(args->grouplist, linux_gidset, ngrp * sizeof(l_gid_t));
if (error)
diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c
index 39dbfcd1e10a..06318eb3d8dd 100644
--- a/sys/compat/linux/linux_uid16.c
+++ b/sys/compat/linux/linux_uid16.c
@@ -100,7 +100,7 @@ linux_setgroups16(struct thread *td, struct linux_setgroups16_args *args)
#endif
ngrp = args->gidsetsize;
- if (ngrp >= NGROUPS)
+ if (ngrp < 0 || ngrp >= NGROUPS)
return (EINVAL);
error = copyin(args->gidset, linux_gidset, ngrp * sizeof(l_gid16_t));
if (error)