Code

src/daemon/utils_time.c: Fix invalid strcpy position in format_rfc3339().
[collectd.git] / src / daemon / utils_time.c
index 45828b342e88b023b25d84bc5238501bb7315cd6..a3a9c33ae78343a291d07fd5d6cddee572bf3d68 100644 (file)
@@ -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 */