Initialize prompt buffers in the configuration menus
malloc() does not make sure that the buffer is initialized to contain all zeros. Initialize the buffer with the empty string. Reported-by: Håkan Jerning <jerning@home.se> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
parent
80a7267f8c
commit
d0916ced78
@ -689,7 +689,10 @@ static void general_option_edit(int i)
|
||||
const char *periodic_save_str =
|
||||
_("Enter the delay, in minutes, between automatic saves (0 to disable) ");
|
||||
int val;
|
||||
char *buf = malloc(BUFSIZ);
|
||||
char *buf;
|
||||
|
||||
buf = mem_malloc(BUFSIZ);
|
||||
buf[0] = '\0';
|
||||
|
||||
switch (i) {
|
||||
case 0:
|
||||
|
@ -693,6 +693,7 @@ static void config_option_edit(int i)
|
||||
const char *cmd_str = _("Enter the notification command ");
|
||||
|
||||
buf = mem_malloc(BUFSIZ);
|
||||
buf[0] = '\0';
|
||||
|
||||
switch (i) {
|
||||
case 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user