mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 01:02:19 +02:00
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>
This commit is contained in:
@@ -258,7 +258,7 @@ int cli_simple_run_command(const char *cmd, int flag)
|
|||||||
|
|
||||||
void cli_simple_loop(void)
|
void cli_simple_loop(void)
|
||||||
{
|
{
|
||||||
static char lastcommand[CONFIG_SYS_CBSIZE] = { 0, };
|
static char lastcommand[CONFIG_SYS_CBSIZE + 1] = { 0, };
|
||||||
|
|
||||||
int len;
|
int len;
|
||||||
int flag;
|
int flag;
|
||||||
|
Reference in New Issue
Block a user