projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ec8f4d
)
src/collectd-tg.c: Explicitly null-terminate string.
author
Florian Forster
<octo@collectd.org>
Tue, 8 Dec 2015 10:46:09 +0000
(11:46 +0100)
committer
Florian Forster
<octo@collectd.org>
Tue, 8 Dec 2015 10:46:20 +0000
(11:46 +0100)
CID: 37937
Signed-off-by: Florian Forster <octo@collectd.org>
src/collectd-tg.c
patch
|
blob
|
history
diff --git
a/src/collectd-tg.c
b/src/collectd-tg.c
index
9fec340
..
9857f92
100644
(file)
--- a/
src/collectd-tg.c
+++ b/
src/collectd-tg.c
@@
-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 ());