diff --git a/src/tcpconns.c b/src/tcpconns.c
index 4f46e78abfd7a8cfab390b497957b010a021c4f6..655c53e5689ff35647216d50b2a4b01e4bbb1cf2 100644 (file)
--- a/src/tcpconns.c
+++ b/src/tcpconns.c
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))