projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f458c8d
)
cli_simple.c: fix possible overflow when copying the string
author
Imran Zaman
<imran.zaman@intel.com>
Mon, 7 Sep 2015 08:24:08 +0000
(11:24 +0300)
committer
Tom Rini
<trini@konsulko.com>
Tue, 15 Sep 2015 19:04:53 +0000
(15:04 -0400)
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>
common/cli_simple.c
patch
|
blob
|
history
diff --git
a/common/cli_simple.c
b/common/cli_simple.c
index 00a8d2f48b33d767d69310345eb900345b6197ab..d8b40c93915496a62833171005c190935d363b72 100644
(file)
--- 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;