[U-Boot] hush shell: Avoid string write overflow when entering max cmd length

Tom Rini trini at ti.com
Tue May 13 03:53:07 CEST 2014


On Fri, Apr 25, 2014 at 03:35:43PM +0200, Kristian Otnes wrote:

> console_buffer array is defined to be CONFIG_SYS_CBSIZE + 1 long,
> whereas the_command array only CONFIG_SYS_CBSIZE long. Subsequent
> use of strcpy(the_command, console_buffer) will write final \0
> terminating byte outside the_command array when entering a command
> of max length.
> 
> Signed-off-by: Kristian Otnes <kotnes <at> cisco <dot> com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140512/1b04ce4f/attachment.pgp>


More information about the U-Boot mailing list