common: command: tempory buffer should have size of command line buf
PATCH 1/1 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 <[email protected]>
--- common/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
common/command.c +1 -1
@@ -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) {
Signature · 1 line
2.15.0
PATCH 1/1 common: command: tempory buffer should have size of command line buf
Quoted 6 lines · Heinrich Schuchardt
When copying the command line buffer the target array should at least have the same size.
Cf. definition of
console_bufferincommon/cli_readline.c.Signed-off-by Heinrich Schuchardt <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171130/9893453e/attachment.sig>