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>2002-12-16 21:56:33 +0300
committerChristopher Faylor <me@cgf.cx>2002-12-16 21:56:33 +0300
commit9ec7b58c62852273dd05c964a00c42f0524c689d (patch)
tree501093cdd872a1934efdf164e5719a37cf0f24c9
parent84c221c08ea504dc8f20132e0e7107eb643aee4e (diff)
* pinfo.cc (_pinfo::cmdline): Allocate sufficient space for myself command line
args.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/pinfo.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index c19dfdb3d..4a5bf424d 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2002-12-16 Christopher Faylor <cgf@redhat.com>
+
+ * pinfo.cc (_pinfo::cmdline): Allocate sufficient space for myself
+ command line args.
+
2002-12-14 Steve Osborn <bub@io.com>
* fhandler_termios.cc (fhandler_termios::line_edit): Call
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 75b71f22b..3c5af4bce 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -444,7 +444,7 @@ _pinfo::cmdline (size_t& n)
{
n = 1;
for (char **a = __argv; *a; a++)
- n += strlen (*a);
+ n += strlen (*a) + 1;
char *p;
p = s = (char *) malloc (n);
for (char **a = __argv; *a; a++)