summaryrefslogtreecommitdiffstats
path: root/common/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/parser.c')
-rw-r--r--common/parser.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/parser.c b/common/parser.c
index fb9ef42e7f..387cd64c42 100644
--- a/common/parser.c
+++ b/common/parser.c
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
#include <common.h>
#include <command.h>
#include <password.h>
@@ -270,7 +272,7 @@ int run_shell(void)
login();
for (;;) {
- len = readline (CONFIG_PROMPT, console_buffer, CONFIG_CBSIZE);
+ len = readline (CONFIG_PROMPT, console_buffer, CONFIG_CBSIZE - 1);
if (len > 0)
strcpy (lastcommand, console_buffer);