cwe-120 bugfix in timekeeper.cpp

This commit is contained in:
cyberman54 2022-08-16 13:49:00 +02:00
parent 85425e22de
commit eacf4a0d56

View File

@ -332,7 +332,7 @@ time_t compileTime(void) {
if (secs == -1) {
// determine date
sscanf(__DATE__, "%s %d %d", s_month, &t.tm_mday, &year);
sscanf(__DATE__, "%4s %d %d", s_month, &t.tm_mday, &year);
t.tm_mon = (strstr(month_names, s_month) - month_names) / 3;
t.tm_year = year - 1900;
// determine time