projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a71389b
)
Joseph Chiu <josephc@idealab.com> found an off-by-one bug. oops!
author
Eric Andersen
<andersen@codepoet.org>
Thu, 1 Aug 2002 01:31:17 +0000
(
01:31
-0000)
committer
Eric Andersen
<andersen@codepoet.org>
Thu, 1 Aug 2002 01:31:17 +0000
(
01:31
-0000)
libpwdgrp/initgroups.c
patch
|
blob
|
history
diff --git
a/libpwdgrp/initgroups.c
b/libpwdgrp/initgroups.c
index 57b25f343fb833749e5d67f777a836abc7fa5673..22ba6eb1e3a13202609d12274e94fa9c52bfd2b8 100644
(file)
--- 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++;
}