mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-09 06:18:06 +00:00
logging - size check sprintf
This commit is contained in:
parent
51a928fe7e
commit
5fb5dd0bd6
@ -63,7 +63,7 @@ void _applog(int prio, const char *str)
|
||||
const time_t tmp_time = tv.tv_sec;
|
||||
tm = localtime(&tmp_time);
|
||||
|
||||
sprintf(datetime, " [%d-%02d-%02d %02d:%02d:%02d] ",
|
||||
snprintf(datetime, sizeof(datetime), " [%d-%02d-%02d %02d:%02d:%02d] ",
|
||||
tm->tm_year + 1900,
|
||||
tm->tm_mon + 1,
|
||||
tm->tm_mday,
|
||||
|
Loading…
Reference in New Issue
Block a user