Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-01-26 08:55:29 +0300
committerChristopher Faylor <me@cgf.cx>2003-01-26 08:55:29 +0300
commitc9133395631fb7ff2fb37df4a7ac848d1ddf19a0 (patch)
tree48bbc618c5db0a3276067976199372021f010928 /winsup/cygwin/grp.cc
parent6503705696e9e778fb51b1be354bc879f18ba61c (diff)
* pwdgrp.cc (pwdgrp::parse_group): Fix off-by-one problem in allocating gr_mem.
Diffstat (limited to 'winsup/cygwin/grp.cc')
-rw-r--r--winsup/cygwin/grp.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc
index c16d925f5..7d7f373a2 100644
--- a/winsup/cygwin/grp.cc
+++ b/winsup/cygwin/grp.cc
@@ -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)