summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorEric Andersen2000-07-14 01:13:37 +0000
committerEric Andersen2000-07-14 01:13:37 +0000
commit4ac6cb534d78d63d7b0a206118c56bad7024b9f8 (patch)
treecdf6bf16505e89893739cfc72f39303aa0fff4be /shell
parentec10b9d534d3c7c215144049b10df175aed02aa9 (diff)
downloadbusybox-4ac6cb534d78d63d7b0a206118c56bad7024b9f8.zip
busybox-4ac6cb534d78d63d7b0a206118c56bad7024b9f8.tar.gz
Fix some stupid memory bugs.
-Erik
Diffstat (limited to 'shell')
-rw-r--r--shell/cmdedit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/shell/cmdedit.c b/shell/cmdedit.c
index b94b8e3..0f064b4 100644
--- a/shell/cmdedit.c
+++ b/shell/cmdedit.c
@@ -414,7 +414,6 @@ extern void cmdedit_read_input(char* prompt, char command[BUFSIZ])
char c = 0;
struct history *hp = his_end;
- memset(command, 0, sizeof(command));
if (!reset_term) {
getTermSettings(inputFd, (void*) &initial_settings);
@@ -462,7 +461,7 @@ extern void cmdedit_read_input(char* prompt, char command[BUFSIZ])
xwrite(outputFd, prompt, strlen(prompt));
/* Reset the command string */
- memset(command, 0, sizeof(command));
+ memset(command, 0, BUFSIZ);
len = cursor = 0;
break;