summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_uid16.c
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2010-01-15 07:05:00 +0000
committerbrooks <brooks@FreeBSD.org>2010-01-15 07:05:00 +0000
commitf354ae0814810e4c8aeeea7b9765ba2b6b7d51b2 (patch)
treeba9d01e7a7e11ab0dfaa41cee7b6f6159c0e92b7 /sys/compat/linux/linux_uid16.c
parentc5fa288ed5a9c86497430e9ccb67115b5066e6a8 (diff)
downloadFreeBSD-src-f354ae0814810e4c8aeeea7b9765ba2b6b7d51b2.zip
FreeBSD-src-f354ae0814810e4c8aeeea7b9765ba2b6b7d51b2.tar.gz
Since all other comparisons involving ngroups_max use
"ngroups_max + 1", use ">= ngroups_max+1" instead of the equivalent "> ngroups_max" to reduce confusion.
Diffstat (limited to 'sys/compat/linux/linux_uid16.c')
-rw-r--r--sys/compat/linux/linux_uid16.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c
index 7bbfc8d..6ad674b 100644
--- a/sys/compat/linux/linux_uid16.c
+++ b/sys/compat/linux/linux_uid16.c
@@ -109,7 +109,7 @@ linux_setgroups16(struct thread *td, struct linux_setgroups16_args *args)
#endif
ngrp = args->gidsetsize;
- if (ngrp < 0 || ngrp > ngroups_max)
+ if (ngrp < 0 || ngrp >= ngroups_max + 1)
return (EINVAL);
linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_TEMP, M_WAITOK);
error = copyin(args->gidset, linux_gidset, ngrp * sizeof(l_gid16_t));
OpenPOWER on IntegriCloud