diff options
author | Eric Andersen | 2002-08-01 01:31:17 +0000 |
---|---|---|
committer | Eric Andersen | 2002-08-01 01:31:17 +0000 |
commit | e85dbfdd80eb5f7674b17c86589d41007cc69688 (patch) | |
tree | 95bebadc60b394030c60a91caffc76a67714b6f4 /libpwdgrp/initgroups.c | |
parent | a71389bfe8b7a047ef6da555f274d124318977c9 (diff) | |
download | busybox-e85dbfdd80eb5f7674b17c86589d41007cc69688.zip busybox-e85dbfdd80eb5f7674b17c86589d41007cc69688.tar.gz |
Joseph Chiu <josephc@idealab.com> found an off-by-one bug. oops!
Diffstat (limited to 'libpwdgrp/initgroups.c')
-rw-r--r-- | libpwdgrp/initgroups.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpwdgrp/initgroups.c b/libpwdgrp/initgroups.c index 57b25f3..22ba6eb 100644 --- a/libpwdgrp/initgroups.c +++ b/libpwdgrp/initgroups.c @@ -104,7 +104,7 @@ int initgroups(__const char *user, gid_t gid) group_list = (gid_t *) realloc(group_list, num_groups * sizeof(gid_t *)); #endif - group_list[num_groups] = group->gr_gid; + group_list[num_groups-1] = group->gr_gid; } tmp_mem++; } |