From: Denys Vlasenko Date: Mon, 21 Mar 2011 04:07:43 +0000 (+0100) Subject: init: fix a case where execv's 1st arg was wrong X-Git-Tag: 1_19_0~223 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=32176ccec4eb1a3bc26b0217fa8d23f6ff44fab8;p=oweals%2Fbusybox.git init: fix a case where execv's 1st arg was wrong Signed-off-by: Denys Vlasenko --- diff --git a/init/init.c b/init/init.c index 586e34a18..ff9dc06a4 100644 --- a/init/init.c +++ b/init/init.c @@ -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;