Skip to content

Commit

Permalink
CID 157207
Browse files Browse the repository at this point in the history
  • Loading branch information
yatsukhnenko committed Jul 20, 2017
1 parent 26eeda5 commit 733732a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cluster_library.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 733732a

Please sign in to comment.