Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2017-07-20 23:30:28 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2017-07-20 23:30:28 +0300
commit733732a94b221f69daf4fd3b758c43f8711e93db (patch)
tree6401da7613c5d534904cff7ab8d9e562af3447e9 /cluster_library.c
parent26eeda5b36a163d907886663c8d388506e6d8caa (diff)
CID 157207
Diffstat (limited to 'cluster_library.c')
-rw-r--r--cluster_library.c2
1 files changed, 1 insertions, 1 deletions
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);