commit | 2a262cde0f348b75982844e99b91c337598e6ff1 | [log] [tgz] |
---|---|---|
author | Kristian Otnes <kotnes@cisco.com> | Fri Apr 25 15:35:43 2014 +0200 |
committer | Tom Rini <trini@ti.com> | Mon May 12 15:20:05 2014 -0400 |
tree | 034a76d7fe3a7e183aba9ba9fd3c518e9fa21fef | |
parent | 2253e16dfdbbfbbe786f644ad8690001ada60cac [diff] |
hush shell: Avoid string write overflow when entering max cmd length 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>