mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-20 07:51:35 +08:00
* pwdgrp.cc (pwdgrp::parse_group): Fix off-by-one problem in allocating gr_mem.
This commit is contained in:
parent
6503705696
commit
c913339563
@ -1,3 +1,7 @@
|
||||
2003-01-26 Christopher Faylor <cgf@redhat.com>
|
||||
|
||||
* pwdgrp.cc (pwdgrp::parse_group): Fix off-by-one problem in allocating
|
||||
gr_mem.
|
||||
|
||||
2003-01-26 Christopher Faylor <cgf@redhat.com>
|
||||
|
||||
|
@ -59,7 +59,7 @@ pwdgrp::parse_group ()
|
||||
grp.gr_mem = &null_ptr;
|
||||
if (n)
|
||||
{
|
||||
char **namearray = (char **) calloc (n + 2, sizeof (char *));
|
||||
char **namearray = (char **) calloc (n + 1, sizeof (char *));
|
||||
if (namearray)
|
||||
{
|
||||
for (int i = 0; i < n; i++, dp = strchr (dp, '\0') + 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user