diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-04-20 19:15:27 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-04-20 19:15:27 -0400 |
commit | 29a15ad077bd7af683d3c838d21be1c216f22f8f (patch) | |
tree | 2c73074e6279383df5c2d571ecd4e0cfa9152c6c /src/linux/initgroups.c | |
parent | 18bca575107d80ca81241d1429ded62918c5bd2e (diff) | |
download | musl-29a15ad077bd7af683d3c838d21be1c216f22f8f.tar.gz musl-29a15ad077bd7af683d3c838d21be1c216f22f8f.tar.xz musl-29a15ad077bd7af683d3c838d21be1c216f22f8f.zip |
fix initgroups (uninitialized count passed to getgrouplist)
Diffstat (limited to 'src/linux/initgroups.c')
-rw-r--r-- | src/linux/initgroups.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/linux/initgroups.c b/src/linux/initgroups.c index ef9bc10a..545d1859 100644 --- a/src/linux/initgroups.c +++ b/src/linux/initgroups.c @@ -9,7 +9,7 @@ int setgroups(size_t, const gid_t *); int initgroups(const char *user, gid_t gid) { gid_t groups[NGROUPS_MAX]; - int count; + int count = NGROUPS_MAX; if (getgrouplist(user, gid, groups, &count) < 0) return -1; return setgroups(count, groups); } |