From: Igor Peshansky Date: Sat, 17 Sep 2016 02:56:16 +0000 (-0400) Subject: src/daemon/utils_time.c: Fix invalid strcpy position in format_rfc3339(). X-Git-Tag: collectd-5.7.0~75^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8e6e5fe0c511489301cd7175a687b92fb3d24123;p=collectd.git src/daemon/utils_time.c: Fix invalid strcpy position in format_rfc3339(). --- 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 */