1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-09 14:28:12 +00:00

logging - size check sprintf

This commit is contained in:
Kano 2013-07-06 21:04:32 +10:00
parent 51a928fe7e
commit 5fb5dd0bd6

View File

@ -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,