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,7 +243,9 @@ static int execute(int s, char cmd[BUFFER_MAX])
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmd++;
|
if (*cmd) {
|
||||||
|
cmd++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < sizeof(cmds) / sizeof(cmds[0]); i++) {
|
for (i = 0; i < sizeof(cmds) / sizeof(cmds[0]); i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user