From: Rich Felker Date: Thu, 3 Oct 2013 14:16:01 +0000 (-0400) Subject: fix new environment always being null with execle X-Git-Tag: v0.9.15~109 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2b2aff37aced66e4a50a38a14607a9b1dc0ee001;p=oweals%2Fmusl.git fix new environment always being null with execle the va_arg call for the argv[]-terminating null pointer was missing, so this pointer was being wrongly used as the environment pointer. issue reported by Timo Teräs. proposed patch slightly modified to simplify the resulting code. --- diff --git a/src/process/execle.c b/src/process/execle.c index 64908366..6f2ec055 100644 --- a/src/process/execle.c +++ b/src/process/execle.c @@ -14,9 +14,8 @@ int execle(const char *path, const char *argv0, ...) char **envp; va_start(ap, argv0); argv[0] = (char *)argv0; - for (i=1; i