init: fix a case where execv's 1st arg was wrong
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
e2e55b0eb5
commit
32176ccec4
@ -414,6 +414,7 @@ static void init_exec(const char *command)
|
||||
char *word, *next;
|
||||
int i = 0;
|
||||
next = strcpy(buf, command - dash); /* command including "-" */
|
||||
command = next + dash;
|
||||
while ((word = strsep(&next, " \t")) != NULL) {
|
||||
if (*word != '\0') { /* not two spaces/tabs together? */
|
||||
cmd[i] = word;
|
||||
|
Loading…
Reference in New Issue
Block a user