diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2025-04-06 00:49:44 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2025-04-06 00:50:19 +0000 |
| commit | c59cc29ca60ef674801fce3c577160a0dacee94c (patch) | |
| tree | 898e13b636cb04d6e0f818160c41b8ab7e45d3c0 /src/libenvexec | |
| parent | 84b1c5f50749523d940a449d8f684a38a5d157f5 (diff) | |
| download | skalibs-c59cc29ca60ef674801fce3c577160a0dacee94c.tar.gz | |
child_spawn bugfix (error path could have i > n)
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libenvexec')
| -rw-r--r-- | src/libenvexec/child_spawn.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libenvexec/child_spawn.c b/src/libenvexec/child_spawn.c index 164f1b2..62aedb9 100644 --- a/src/libenvexec/child_spawn.c +++ b/src/libenvexec/child_spawn.c @@ -35,6 +35,7 @@ pid_t child_spawn (char const *prog, char const *const *argv, char const *const m += uint_fmt(modifs + m, p[i][!(i & 1)]) ; if (i+1 < n) modifs[m++] = ',' ; } + i = n ; modifs[m++] = 0 ; env_mergen(newenv, envlen + 2, envp, envlen, modifs, m, 1) ; if (n) fa[0].x.fd2[1] = p[0][1] ; |
