Merge branch 'collectd-4.4'
[collectd.git] / src / tcpconns.c
index 4f46e78..655c53e 100644 (file)
@@ -135,9 +135,9 @@ static void conn_submit_port_entry (port_entry_t *pe)
   vl.values = values;
   vl.values_len = 1;
   vl.time = time (NULL);
-  strcpy (vl.host, hostname_g);
-  strcpy (vl.plugin, "tcpconns");
-  strcpy (vl.type, "tcp_connections");
+  sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+  sstrncpy (vl.plugin, "tcpconns", sizeof (vl.plugin));
+  sstrncpy (vl.type, "tcp_connections", sizeof (vl.type));
 
   if (((port_collect_listening != 0) && (pe->flags & PORT_IS_LISTENING))
       || (pe->flags & PORT_COLLECT_LOCAL))