]> Zhao Yanbai Git Server - minix.git/commitdiff
Fix off-by-one error
authorThomas Veerman <thomas@minix3.org>
Thu, 8 Sep 2011 15:09:41 +0000 (15:09 +0000)
committerThomas Veerman <thomas@minix3.org>
Thu, 8 Sep 2011 15:10:57 +0000 (15:10 +0000)
servers/ext2/protect.c
servers/mfs/protect.c

index 9fdfe50a5e17d43c4c9f43fb12e088f34a5f7a88..0fe5d2e9abe9feb64789baf9032cb688379a1d3d 100644 (file)
@@ -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++)
index 0a6d01afb1ba318777106bb99e0b31042e8c6d4f..6ca64d8604be3c726d15f52970bb4fa43bd10142 100644 (file)
@@ -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++)