diff options
author | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2017-07-20 23:30:28 +0300 |
---|---|---|
committer | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2017-07-20 23:30:28 +0300 |
commit | 733732a94b221f69daf4fd3b758c43f8711e93db (patch) | |
tree | 6401da7613c5d534904cff7ab8d9e562af3447e9 | |
parent | 26eeda5b36a163d907886663c8d388506e6d8caa (diff) |
CID 157207
-rw-r--r-- | cluster_library.c | 2 |
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); |