From 9ec7b58c62852273dd05c964a00c42f0524c689d Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 16 Dec 2002 18:56:33 +0000 Subject: * pinfo.cc (_pinfo::cmdline): Allocate sufficient space for myself command line args. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/pinfo.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c19dfdb..4a5bf42 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2002-12-16 Christopher Faylor + + * pinfo.cc (_pinfo::cmdline): Allocate sufficient space for myself + command line args. + 2002-12-14 Steve Osborn * fhandler_termios.cc (fhandler_termios::line_edit): Call diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 75b71f2..3c5af4b 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++) -- cgit v1.1