From: Thomas Veerman Date: Thu, 8 Sep 2011 15:09:41 +0000 (+0000) Subject: Fix off-by-one error X-Git-Tag: v3.2.0~312 X-Git-Url: http://zhaoyanbai.com/repos/man.dnssec-keygen.html?a=commitdiff_plain;h=ce1a2793f99dbd6255ee43dd7f37935550dcac12;p=minix.git Fix off-by-one error --- diff --git a/servers/ext2/protect.c b/servers/ext2/protect.c index 9fdfe50a5..0fe5d2e9a 100644 --- a/servers/ext2/protect.c +++ b/servers/ext2/protect.c @@ -130,7 +130,7 @@ PRIVATE int in_group(gid_t grp) { int i; - if (credentials.vu_ngroups >= NGROUPS_MAX) + if (credentials.vu_ngroups > NGROUPS_MAX) return(EINVAL); for (i = 0; i < credentials.vu_ngroups; i++) diff --git a/servers/mfs/protect.c b/servers/mfs/protect.c index 0a6d01afb..6ca64d860 100644 --- a/servers/mfs/protect.c +++ b/servers/mfs/protect.c @@ -124,7 +124,7 @@ PRIVATE int in_group(gid_t grp) { int i; - if (credentials.vu_ngroups >= NGROUPS_MAX) + if (credentials.vu_ngroups > NGROUPS_MAX) return(EINVAL); for (i = 0; i < credentials.vu_ngroups; i++)