From: Ulrich Drepper Date: Fri, 11 Jan 2002 01:02:18 +0000 (+0000) Subject: (__group_member): Also check groups[0]. X-Git-Tag: cvs/glibc-2-2-5~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5128ccc6e54280ed2d947cad7b766d0140217c40;p=thirdparty%2Fglibc.git (__group_member): Also check groups[0]. --- diff --git a/sysdeps/generic/group_member.c b/sysdeps/generic/group_member.c index 416abfab2a3..7bd9c46ba22 100644 --- a/sysdeps/generic/group_member.c +++ b/sysdeps/generic/group_member.c @@ -1,5 +1,5 @@ /* `group_member' -- test if process is in a given group. - Copyright (C) 1995, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1997, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -41,7 +41,7 @@ __group_member (gid) size *= 2; } while (n == size / 2); - while (n > 0) + while (n >= 0) if (groups[n--] == gid) return 1;