From 733732a94b221f69daf4fd3b758c43f8711e93db Mon Sep 17 00:00:00 2001 From: Pavlo Yatsukhnenko Date: Thu, 20 Jul 2017 23:30:28 +0300 Subject: CID 157207 --- cluster_library.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cluster_library.c') diff --git a/cluster_library.c b/cluster_library.c index 34c3442e..344b5400 100644 --- a/cluster_library.c +++ b/cluster_library.c @@ -998,7 +998,7 @@ static int cluster_set_redirection(redisCluster* c, char *msg, int moved) // Success, apply it c->redir_type = moved ? REDIR_MOVED : REDIR_ASK; - strncpy(c->redir_host, host, sizeof(c->redir_host)); + strncpy(c->redir_host, host, sizeof(c->redir_host) - 1); c->redir_host_len = port - host - 1; c->redir_slot = (unsigned short)atoi(msg); c->redir_port = (unsigned short)atoi(port); -- cgit v1.2.3