From f35f4340a4f7ae02b1139ac9f303e5b8081d71e9 Mon Sep 17 00:00:00 2001 From: andersen Date: Fri, 14 Jul 2000 01:13:37 +0000 Subject: Fix some stupid memory bugs. -Erik git-svn-id: svn://busybox.net/trunk/busybox@847 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- shell/cmdedit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'shell') diff --git a/shell/cmdedit.c b/shell/cmdedit.c index b94b8e331..0f064b414 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; -- cgit v1.2.3-55-g6feb