summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2017-11-19 23:07:50 +0100
committerTom Rini <trini@konsulko.com>2017-11-29 22:30:50 -0500
commit2614a208471e0e82b1fd197fcd3f1ca7ecda969b (patch)
tree63a78f3fa3ad9577d767fd23e31c67cb7020960d /common
parent3cc566117e18f5b3fe3e79a593bee32703f83192 (diff)
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: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'common')
-rw-r--r--common/command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/command.c b/common/command.c
index e5d9b9cf95..21a6d409fb 100644
--- a/common/command.c
+++ b/common/command.c
@@ -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)
{