1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
--- a/common/log.c 2020-08-31 09:56:09.995682785 +0200
+++ b/common/log.c 2020-08-26 04:32:21.000000000 +0200
@@ -555,9 +555,10 @@
now_t = time(&now_t);
now = localtime(&now_t);
- snprintf(buff, 21, "[%.4d%.2d%.2d-%.2d:%.2d:%.2d] ", now->tm_year + 1900,
+ if (snprintf(buff, 21, "[%.4d%.2d%.2d-%.2d:%.2d:%.2d] ", now->tm_year + 1900,
now->tm_mon + 1, now->tm_mday, now->tm_hour, now->tm_min,
- now->tm_sec);
+ now->tm_sec) < 0)
+ *buff = '\0';
internal_log_lvl2str(lvl, buff + 20);
|