* pinfo.cc (_pinfo::cmdline): Allocate sufficient space for myself command line

args.
This commit is contained in:
Christopher Faylor 2002-12-16 18:56:33 +00:00
parent 84c221c08e
commit 9ec7b58c62
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

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