diff options
author | Miles Bader <miles@gnu.org> | 1996-05-22 19:55:28 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-05-22 19:55:28 +0000 |
commit | 0405b04ddecbc80ea486c8023e4c72d1d9b24324 (patch) | |
tree | 8bc46960117a615fb772f8875c45d59b40da0d83 /hurd | |
parent | Regenerated: autoconf configure.in (diff) | |
download | glibc-0405b04ddecbc80ea486c8023e4c72d1d9b24324.tar.gz glibc-0405b04ddecbc80ea486c8023e4c72d1d9b24324.tar.bz2 glibc-0405b04ddecbc80ea486c8023e4c72d1d9b24324.zip |
(_hurd_startup): Pass the correct counts to argz_extract, and terminate the resulting vectors.
Diffstat (limited to 'hurd')
-rw-r--r-- | hurd/hurdstartup.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hurd/hurdstartup.c b/hurd/hurdstartup.c index 17a7705847..b4721d7ef7 100644 --- a/hurd/hurdstartup.c +++ b/hurd/hurdstartup.c @@ -136,11 +136,13 @@ _hurd_startup (void **argptr, void (*main) (int *data)) sizeof (struct hurd_startup_data)); *argcptr = argc; argv = (void *) (argcptr + 1); - __argz_extract (args, argslen, argv); + __argz_extract (args, argc, argv); + argv[argc] = 0; /* There was some environment. */ envp = &argv[argc + 1]; - __argz_extract (env, envlen, envp); + __argz_extract (env, envc, envp); + envp[envc] = 0; } if (err || in_bootstrap == MACH_PORT_NULL) |