diff options
author | Imran Zaman <imran.zaman@intel.com> | 2015-09-07 11:24:08 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-09-15 15:04:53 -0400 |
commit | ca7def6003d376eb50547c468167e10cb5c2b835 (patch) | |
tree | c138d03e0bd7e99cfe9cb022fa598c5000dbbc2f /common | |
parent | f458c8dac463d0a6037d4ecdbe59f07c4df34ad4 (diff) | |
download | u-boot-imx-ca7def6003d376eb50547c468167e10cb5c2b835.zip u-boot-imx-ca7def6003d376eb50547c468167e10cb5c2b835.tar.gz u-boot-imx-ca7def6003d376eb50547c468167e10cb5c2b835.tar.bz2 |
cli_simple.c: fix possible overflow when copying the string
Bigger source buffer than dest buffer could overflow when copying
strings. Source and destination buffer sizes are same now.
Signed-off-by: Imran Zaman <imran.zaman@intel.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/cli_simple.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/cli_simple.c b/common/cli_simple.c index 00a8d2f..d8b40c9 100644 --- a/common/cli_simple.c +++ b/common/cli_simple.c @@ -258,7 +258,7 @@ int cli_simple_run_command(const char *cmd, int flag) void cli_simple_loop(void) { - static char lastcommand[CONFIG_SYS_CBSIZE] = { 0, }; + static char lastcommand[CONFIG_SYS_CBSIZE + 1] = { 0, }; int len; int flag; |