Code

Merge branch 'collectd-4.3' into collectd-4.4
[collectd.git] / src / email.c
index ed10e349938d5aadceeaf3c522bce36913aaba3d..510a66470cb2142872a402f3d40e60e8286f133b 100644 (file)
@@ -657,8 +657,8 @@ static void email_submit (const char *type, const char *type_instance, gauge_t v
        vl.values = values;
        vl.values_len = 1;
        vl.time = time (NULL);
-       strcpy (vl.host, hostname_g);
-       strcpy (vl.plugin, "email");
+       sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+       sstrncpy (vl.plugin, "email", sizeof (vl.plugin));
        strncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
 
        plugin_dispatch_values (type, &vl);