From 7dd2b8545fbb14d429056377da07ed6e6dbbab76 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sun, 29 Nov 2015 17:52:26 +0100 Subject: [PATCH] redis plugin: make sure buffer is null-terminated CID 37938 --- src/redis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++) { -- 2.30.2