src/apoint.c: Fix a length bug introduced by new duration format
Commit 4ff3bb9d introduced a new format for parsing durations, thus allowing a larger string to be retrieved from user input. However, the string used is still declared with the old length, leading to crashes when compiling with stack-smashing protection features (the default on Archlinux). Inputting a duration string of more than 8 characters (such as "+1d11h11m") would crash calcurse with a *** stack smashing detected *** message. Using a larger string from the start fixes the bug. Signed-off-by: Baptiste Jonglez <baptiste@jonglez.org> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
parent
af9bdd018a
commit
71e05b1dcf
@ -166,7 +166,7 @@ apoint_add (void)
|
|||||||
_("You entered an invalid end time, should be [hh:mm], [+hh:mm] or [+mm]");
|
_("You entered an invalid end time, should be [hh:mm], [+hh:mm] or [+mm]");
|
||||||
char *enter_str = _("Press [Enter] to continue");
|
char *enter_str = _("Press [Enter] to continue");
|
||||||
int Id = 1;
|
int Id = 1;
|
||||||
char item_time[LTIME] = "";
|
char item_time[LDUR] = "";
|
||||||
char item_mesg[BUFSIZ] = "";
|
char item_mesg[BUFSIZ] = "";
|
||||||
long apoint_start;
|
long apoint_start;
|
||||||
unsigned heures, minutes;
|
unsigned heures, minutes;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user