Xinqi Bao's Git
projects
/
slstatus.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
(from parent 1:
f64bf0f
)
Merge pull request #5 from Vlaix/master
author
Aaron Marcher <
[email protected]
>
Thu, 10 Mar 2016 09:59:59 +0000
(10:59 +0100)
committer
Aaron Marcher <
[email protected]
>
Thu, 10 Mar 2016 09:59:59 +0000
(10:59 +0100)
Fixed small buffer in get_datetime()
slstatus.c
patch
|
blob
|
history
diff --git
a/slstatus.c
b/slstatus.c
index
fa627df
..
42e5751
100644
(file)
--- 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);
}