From 0405b04ddecbc80ea486c8023e4c72d1d9b24324 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 22 May 1996 19:55:28 +0000 Subject: (_hurd_startup): Pass the correct counts to argz_extract, and terminate the resulting vectors. --- hurd/hurdstartup.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'hurd') 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) -- cgit v1.1