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:
parent
cb8a9fcc56
commit
62bb385728
@ -243,8 +243,10 @@ static int execute(int s, char cmd[BUFFER_MAX])
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (*cmd) {
|
||||||
cmd++;
|
cmd++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < sizeof(cmds) / sizeof(cmds[0]); i++) {
|
for (i = 0; i < sizeof(cmds) / sizeof(cmds[0]); i++) {
|
||||||
if (!strcmp(cmds[i].name,arg[0])) {
|
if (!strcmp(cmds[i].name,arg[0])) {
|
||||||
|
Loading…
Reference in New Issue
Block a user