]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(__group_member): Also check groups[0].
authorUlrich Drepper <drepper@redhat.com>
Fri, 11 Jan 2002 01:02:18 +0000 (01:02 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 11 Jan 2002 01:02:18 +0000 (01:02 +0000)
sysdeps/generic/group_member.c

index 416abfab2a305ce51bad763e10b3d846e6a0a773..7bd9c46ba22c2402af8a1306cf71a16131715bf9 100644 (file)
@@ -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;