X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fserial.c;h=cfa26bbd120b268cefea5d90669bd58917d3bb82;hb=refs%2Fheads%2Fff%2Fjson;hp=fb30fc4e7e01e2ea9b4408759cd58fa3b2ec9fcf;hpb=2354eda94fa44c8bcb8e39b24b117e7937110224;p=collectd.git diff --git a/src/serial.c b/src/serial.c index fb30fc4e..cfa26bbd 100644 --- a/src/serial.c +++ b/src/serial.c @@ -40,11 +40,10 @@ static void serial_submit (const char *type_instance, vl.values = values; vl.values_len = 2; - vl.time = time (NULL); - strcpy (vl.host, hostname_g); - strcpy (vl.plugin, "serial"); - strcpy (vl.type, "serial_octets"); - strncpy (vl.type_instance, type_instance, + sstrncpy (vl.host, hostname_g, sizeof (vl.host)); + sstrncpy (vl.plugin, "serial", sizeof (vl.plugin)); + sstrncpy (vl.type, "serial_octets", sizeof (vl.type)); + sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance)); plugin_dispatch_values (&vl);