aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-09 19:33:26 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-18 15:15:16 +0000
commit38c8f4e0a3d7331b7fab1bd9e167b230edacc4ef (patch)
tree9e17f5e454c8012c870eed18817711d06a25a491
parentfix a few leaks by throwing objects, not newed pointers to objects (diff)
downloadmonero-38c8f4e0a3d7331b7fab1bd9e167b230edacc4ef.tar.xz
mlog: terminate a string at last char, just in case
-rw-r--r--contrib/epee/src/mlog.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/epee/src/mlog.cpp b/contrib/epee/src/mlog.cpp
index a30efbc6a..5b9472006 100644
--- a/contrib/epee/src/mlog.cpp
+++ b/contrib/epee/src/mlog.cpp
@@ -59,6 +59,7 @@ static std::string generate_log_filename(const char *base)
strcpy(tmp, "unknown");
else
strftime(tmp, sizeof(tmp), "%Y-%m-%d-%H-%M-%S", &tm);
+ tmp[sizeof(tmp) - 1] = 0;
filename += "-";
filename += tmp;
return filename;