提交 2614a208 编写于 作者: H Heinrich Schuchardt 提交者: Tom Rini

common: command: tempory buffer should have size of command line buf

When copying the command line buffer the target array should
at least have the same size.

Cf. definition of console_buffer in common/cli_readline.c.
Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
上级 3cc56611
......@@ -318,7 +318,7 @@ static int find_common_prefix(char * const argv[])
return len;
}
static char tmp_buf[CONFIG_SYS_CBSIZE]; /* copy of console I/O buffer */
static char tmp_buf[CONFIG_SYS_CBSIZE + 1]; /* copy of console I/O buffer */
int cmd_auto_complete(const char *const prompt, char *buf, int *np, int *colp)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册