aboutsummaryrefslogtreecommitdiffstats
path: root/tls.c
diff options
context:
space:
mode:
Diffstat (limited to 'tls.c')
-rw-r--r--tls.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tls.c b/tls.c
index 719c8c59..4d1ab91e 100644
--- a/tls.c
+++ b/tls.c
@@ -91,16 +91,16 @@ static void list_file(const char *fname)
if (buf.st_mtime) {
mt = gmtime(&buf.st_mtime);
- sprintf(datebuf, "%04d-%02d-%02d %02d:%02d:%02d",
+ snprintf(datebuf, sizeof datebuf,
+ "%04d-%02d-%02d %02d:%02d:%02d",
(int)mt->tm_year + 1900,
(int)mt->tm_mon + 1,
(int)mt->tm_mday,
(int)mt->tm_hour,
(int)mt->tm_min,
(int)mt->tm_sec);
- } else {
+ } else
strlcpy(datebuf, " ", sizeof datebuf);
- }
/* TODO: Perhaps escape special characters in fname? */