diff options
author | Baptiste Jonglez <baptiste@jonglez.org> | 2012-01-06 23:49:51 +0100 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-01-07 12:30:56 +0100 |
commit | 71e05b1dcf8a2ae47d59af8ab6e976a900ab9dc2 (patch) | |
tree | 513b4d8f951f9a3d6020180371b6183dcec1beaf /src/apoint.c | |
parent | af9bdd018a98582edf8c3cb538ebf716a25a9df5 (diff) | |
download | calcurse-71e05b1dcf8a2ae47d59af8ab6e976a900ab9dc2.zip |
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>
Diffstat (limited to 'src/apoint.c')
-rw-r--r-- | src/apoint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/apoint.c b/src/apoint.c index 9e0d1b9..aa2a516 100644 --- a/src/apoint.c +++ b/src/apoint.c @@ -166,7 +166,7 @@ apoint_add (void) _("You entered an invalid end time, should be [hh:mm], [+hh:mm] or [+mm]"); char *enter_str = _("Press [Enter] to continue"); int Id = 1; - char item_time[LTIME] = ""; + char item_time[LDUR] = ""; char item_mesg[BUFSIZ] = ""; long apoint_start; unsigned heures, minutes; |