mirror of
https://github.com/sheumann/hush.git
synced 2024-08-20 19:29:02 +00:00
Fix some stupid memory bugs.
-Erik
This commit is contained in:
parent
ec10b9d534
commit
4ac6cb534d
@ -414,7 +414,6 @@ extern void cmdedit_read_input(char* prompt, char command[BUFSIZ])
|
|||||||
char c = 0;
|
char c = 0;
|
||||||
struct history *hp = his_end;
|
struct history *hp = his_end;
|
||||||
|
|
||||||
memset(command, 0, sizeof(command));
|
|
||||||
if (!reset_term) {
|
if (!reset_term) {
|
||||||
|
|
||||||
getTermSettings(inputFd, (void*) &initial_settings);
|
getTermSettings(inputFd, (void*) &initial_settings);
|
||||||
@ -462,7 +461,7 @@ extern void cmdedit_read_input(char* prompt, char command[BUFSIZ])
|
|||||||
xwrite(outputFd, prompt, strlen(prompt));
|
xwrite(outputFd, prompt, strlen(prompt));
|
||||||
|
|
||||||
/* Reset the command string */
|
/* Reset the command string */
|
||||||
memset(command, 0, sizeof(command));
|
memset(command, 0, BUFSIZ);
|
||||||
len = cursor = 0;
|
len = cursor = 0;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -414,7 +414,6 @@ extern void cmdedit_read_input(char* prompt, char command[BUFSIZ])
|
|||||||
char c = 0;
|
char c = 0;
|
||||||
struct history *hp = his_end;
|
struct history *hp = his_end;
|
||||||
|
|
||||||
memset(command, 0, sizeof(command));
|
|
||||||
if (!reset_term) {
|
if (!reset_term) {
|
||||||
|
|
||||||
getTermSettings(inputFd, (void*) &initial_settings);
|
getTermSettings(inputFd, (void*) &initial_settings);
|
||||||
@ -462,7 +461,7 @@ extern void cmdedit_read_input(char* prompt, char command[BUFSIZ])
|
|||||||
xwrite(outputFd, prompt, strlen(prompt));
|
xwrite(outputFd, prompt, strlen(prompt));
|
||||||
|
|
||||||
/* Reset the command string */
|
/* Reset the command string */
|
||||||
memset(command, 0, sizeof(command));
|
memset(command, 0, BUFSIZ);
|
||||||
len = cursor = 0;
|
len = cursor = 0;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user