aboutsummaryrefslogtreecommitdiff
path: root/hurd/hurdstartup.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-05-22 19:55:28 +0000
committerMiles Bader <miles@gnu.org>1996-05-22 19:55:28 +0000
commit0405b04ddecbc80ea486c8023e4c72d1d9b24324 (patch)
tree8bc46960117a615fb772f8875c45d59b40da0d83 /hurd/hurdstartup.c
parentdc9972317e6fe44e503fbfe83446272743c76fb3 (diff)
downloadglibc-0405b04ddecbc80ea486c8023e4c72d1d9b24324.zip
glibc-0405b04ddecbc80ea486c8023e4c72d1d9b24324.tar.gz
glibc-0405b04ddecbc80ea486c8023e4c72d1d9b24324.tar.bz2
(_hurd_startup): Pass the correct counts to argz_extract, and terminate the resulting vectors.
Diffstat (limited to 'hurd/hurdstartup.c')
-rw-r--r--hurd/hurdstartup.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hurd/hurdstartup.c b/hurd/hurdstartup.c
index 17a7705..b4721d7 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)