projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
652b504
)
cli_readline: Only insert printable chars
author
Steve Bennett
<steveb@workware.net.au>
Sun, 22 Nov 2020 04:58:45 +0000
(14:58 +1000)
committer
Tom Rini
<trini@konsulko.com>
Sat, 16 Jan 2021 19:49:09 +0000
(14:49 -0500)
There should be no need to insert non-printable characters
and this prevents line editing getting confused.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
common/cli_readline.c
patch
|
blob
|
history
diff --git
a/common/cli_readline.c
b/common/cli_readline.c
index 47b876285cc1ff691bff4eca53531d712b903671..5c158d03b4adf58827e3d876f752cc4ba3c4d11f 100644
(file)
--- a/
common/cli_readline.c
+++ b/
common/cli_readline.c
@@
-493,8
+493,10
@@
static int cread_line(const char *const prompt, char *buf, unsigned int *len,
}
#endif
default:
- cread_add_char(ichar, insert, &num, &eol_num, buf,
- *len);
+ if (ichar >= ' ' && ichar <= '~') {
+ cread_add_char(ichar, insert, &num, &eol_num,
+ buf, *len);
+ }
break;
}
}