projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74b894a
)
redis plugin: make sure buffer is null-terminated
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sun, 29 Nov 2015 16:52:26 +0000
(17:52 +0100)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sun, 29 Nov 2015 16:52:26 +0000
(17:52 +0100)
CID 37938
src/redis.c
patch
|
blob
|
history
diff --git
a/src/redis.c
b/src/redis.c
index
7864ead
..
a40d2cd
100644
(file)
--- a/
src/redis.c
+++ b/
src/redis.c
@@
-141,7
+141,7
@@
static redis_query_t *redis_config_query (oconfig_item_t *ci) /* {{{ */
* Default to a gauge type.
*/
(void)strncpy(rq->type, "gauge", sizeof(rq->type));
- (void)strncpy(rq->instance, rq->query, sizeof(rq->instance));
+ (void)s
s
trncpy(rq->instance, rq->query, sizeof(rq->instance));
replace_special(rq->instance, sizeof(rq->instance));
for (i = 0; i < ci->children_num; i++) {