summaryrefslogtreecommitdiff
path: root/libpwdgrp
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-08-01 01:31:17 +0000
committerEric Andersen <andersen@codepoet.org>2002-08-01 01:31:17 +0000
commite85dbfdd80eb5f7674b17c86589d41007cc69688 (patch)
tree95bebadc60b394030c60a91caffc76a67714b6f4 /libpwdgrp
parenta71389bfe8b7a047ef6da555f274d124318977c9 (diff)
downloadbusybox-w32-e85dbfdd80eb5f7674b17c86589d41007cc69688.tar.gz
busybox-w32-e85dbfdd80eb5f7674b17c86589d41007cc69688.tar.bz2
busybox-w32-e85dbfdd80eb5f7674b17c86589d41007cc69688.zip
Joseph Chiu <josephc@idealab.com> found an off-by-one bug. oops!
Diffstat (limited to 'libpwdgrp')
-rw-r--r--libpwdgrp/initgroups.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpwdgrp/initgroups.c b/libpwdgrp/initgroups.c
index 57b25f343..22ba6eb1e 100644
--- a/libpwdgrp/initgroups.c
+++ b/libpwdgrp/initgroups.c
@@ -104,7 +104,7 @@ int initgroups(__const char *user, gid_t gid)
104 group_list = (gid_t *) realloc(group_list, num_groups * 104 group_list = (gid_t *) realloc(group_list, num_groups *
105 sizeof(gid_t *)); 105 sizeof(gid_t *));
106#endif 106#endif
107 group_list[num_groups] = group->gr_gid; 107 group_list[num_groups-1] = group->gr_gid;
108 } 108 }
109 tmp_mem++; 109 tmp_mem++;
110 } 110 }