From 8e6e5fe0c511489301cd7175a687b92fb3d24123 Mon Sep 17 00:00:00 2001 From: Igor Peshansky Date: Fri, 16 Sep 2016 22:56:16 -0400 Subject: [PATCH] src/daemon/utils_time.c: Fix invalid strcpy position in format_rfc3339(). --- src/daemon/utils_time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daemon/utils_time.c b/src/daemon/utils_time.c index 45828b34..a3a9c33a 100644 --- a/src/daemon/utils_time.c +++ b/src/daemon/utils_time.c @@ -180,7 +180,7 @@ int format_rfc3339 (char *buffer, size_t buffer_size, struct tm const *t_tm, lon size_left -= len; } - sstrncpy (buffer, zone, buffer_size); + sstrncpy (pos, zone, size_left); return 0; } /* }}} int format_rfc3339 */ -- 2.11.0