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 + + * 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 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++)