Fix installd command line parser

Parser does not take into account that the last argument can be empty.
In this case it will skip end of line marker and continue parsing.

Change-Id: I2d029a69ed22cef497893e592ff3275ced97f85f
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
This commit is contained in:
Serguei Katkov 2014-10-29 19:38:01 +06:00
parent cb8a9fcc56
commit 62bb385728

View File

@ -243,7 +243,9 @@ static int execute(int s, char cmd[BUFFER_MAX])
goto done;
}
}
cmd++;
if (*cmd) {
cmd++;
}
}
for (i = 0; i < sizeof(cmds) / sizeof(cmds[0]); i++) {