mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-30 06:43:28 +01:00
mlog: terminate a string at last char, just in case
This commit is contained in:
parent
d753d716a6
commit
38c8f4e0a3
@ -59,6 +59,7 @@ static std::string generate_log_filename(const char *base)
|
|||||||
strcpy(tmp, "unknown");
|
strcpy(tmp, "unknown");
|
||||||
else
|
else
|
||||||
strftime(tmp, sizeof(tmp), "%Y-%m-%d-%H-%M-%S", &tm);
|
strftime(tmp, sizeof(tmp), "%Y-%m-%d-%H-%M-%S", &tm);
|
||||||
|
tmp[sizeof(tmp) - 1] = 0;
|
||||||
filename += "-";
|
filename += "-";
|
||||||
filename += tmp;
|
filename += tmp;
|
||||||
return filename;
|
return filename;
|
||||||
|
Loading…
Reference in New Issue
Block a user