Joseph Chiu <josephc@idealab.com> found an off-by-one bug. oops!
This commit is contained in:
parent
a71389bfe8
commit
e85dbfdd80
1 changed files with 1 additions and 1 deletions
|
@ -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++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue