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.5.1~9 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=eecd71c3112b189329a223af6443e90da2788f03;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++) {