From: Ruben Kerkhof Date: Sun, 29 Nov 2015 16:52:26 +0000 (+0100) Subject: redis plugin: make sure buffer is null-terminated X-Git-Tag: collectd-5.6.0~552^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=7dd2b8545fbb14d429056377da07ed6e6dbbab76;p=collectd.git redis plugin: make sure buffer is null-terminated CID 37938 --- diff --git a/src/redis.c b/src/redis.c index 7864ead0..a40d2cd2 100644 --- 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)sstrncpy(rq->instance, rq->query, sizeof(rq->instance)); replace_special(rq->instance, sizeof(rq->instance)); for (i = 0; i < ci->children_num; i++) {