summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Marcher <info@nulltime.net>2016-03-10 10:59:59 +0100
committerAaron Marcher <info@nulltime.net>2016-03-10 10:59:59 +0100
commit175844da0f561395d8429e9b8f8e9ad3d561fa50 (patch)
tree4586042fee5e49ec60f9b5dddb1b747bbb3ca0b8
parentf64bf0f072870e8d70be7b39a3d28c8cd649f368 (diff)
parent790e150a1c6a935a154127b36deaec36d4a5bcc6 (diff)
Merge pull request #5 from Vlaix/master
Fixed small buffer in get_datetime()
-rw-r--r--slstatus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/slstatus.c b/slstatus.c
index fa627df..42e5751 100644
--- a/slstatus.c
+++ b/slstatus.c
@@ -168,13 +168,13 @@ char *
get_datetime()
{
time_t tm;
- size_t bufsize = 19;
+ size_t bufsize = 64;
char *buf = malloc(bufsize);
/* get time in format */
time(&tm);
if(!strftime(buf, bufsize, timeformat, localtime(&tm))) {
- fprintf(stderr, "Strftime failed.\n");
+ fprintf(stderr, "Strftime failed.\n");
exit(1);
}