diff --git a/src/collectd-tg.c b/src/collectd-tg.c
index 9fec340214f4505cf96d9ab0d69fa3b1a800a81a..9857f92ede5ce0023eee3d263c0a6790b6ed5f15 100644 (file)
--- a/src/collectd-tg.c
+++ b/src/collectd-tg.c
strncpy (vl->identifier.type,
(vl->values_types[0] == LCC_TYPE_GAUGE) ? "gauge" : "derive",
sizeof (vl->identifier.type));
+ vl->identifier.type[sizeof (vl->identifier.type) - 1] = 0;
snprintf (vl->identifier.type_instance, sizeof (vl->identifier.type_instance),
"ti%li", random ());