mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 08:11:08 +00:00
(_hurd_startup): Pass the correct counts to argz_extract, and terminate the resulting vectors.
This commit is contained in:
parent
dc9972317e
commit
0405b04dde
@ -136,11 +136,13 @@ _hurd_startup (void **argptr, void (*main) (int *data))
|
|||||||
sizeof (struct hurd_startup_data));
|
sizeof (struct hurd_startup_data));
|
||||||
*argcptr = argc;
|
*argcptr = argc;
|
||||||
argv = (void *) (argcptr + 1);
|
argv = (void *) (argcptr + 1);
|
||||||
__argz_extract (args, argslen, argv);
|
__argz_extract (args, argc, argv);
|
||||||
|
argv[argc] = 0;
|
||||||
|
|
||||||
/* There was some environment. */
|
/* There was some environment. */
|
||||||
envp = &argv[argc + 1];
|
envp = &argv[argc + 1];
|
||||||
__argz_extract (env, envlen, envp);
|
__argz_extract (env, envc, envp);
|
||||||
|
envp[envc] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (err || in_bootstrap == MACH_PORT_NULL)
|
if (err || in_bootstrap == MACH_PORT_NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user