Code

network plugin, libcollectdclient: Check return value of gcry_control().
[collectd.git] / src / collectd-tg.c
index 9fec340214f4505cf96d9ab0d69fa3b1a800a81a..9857f92ede5ce0023eee3d263c0a6790b6ed5f15 100644 (file)
@@ -183,6 +183,7 @@ static lcc_value_list_t *create_value_list (void) /* {{{ */
   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 ());