* 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

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