public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/1] common: command: tempory buffer should have size of command line buf
@ 2017-11-19 22:07 Heinrich Schuchardt
  2017-11-30 15:35 ` [U-Boot] [U-Boot, " Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2017-11-19 22:07 UTC (permalink / raw)
  To: u-boot

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>
---
 common/command.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)
 {
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [U-Boot, 1/1] common: command: tempory buffer should have size of command line buf
  2017-11-19 22:07 [U-Boot] [PATCH 1/1] common: command: tempory buffer should have size of command line buf Heinrich Schuchardt
@ 2017-11-30 15:35 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2017-11-30 15:35 UTC (permalink / raw)
  To: u-boot

On Sun, Nov 19, 2017 at 11:07:50PM +0100, Heinrich Schuchardt wrote:

> 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>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-30 15:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-19 22:07 [U-Boot] [PATCH 1/1] common: command: tempory buffer should have size of command line buf Heinrich Schuchardt
2017-11-30 15:35 ` [U-Boot] [U-Boot, " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox