Skip to content

Commit 733732a

Browse files
committed
CID 157207
1 parent 26eeda5 commit 733732a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cluster_library.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ static int cluster_set_redirection(redisCluster* c, char *msg, int moved)
998998

999999
// Success, apply it
10001000
c->redir_type = moved ? REDIR_MOVED : REDIR_ASK;
1001-
strncpy(c->redir_host, host, sizeof(c->redir_host));
1001+
strncpy(c->redir_host, host, sizeof(c->redir_host) - 1);
10021002
c->redir_host_len = port - host - 1;
10031003
c->redir_slot = (unsigned short)atoi(msg);
10041004
c->redir_port = (unsigned short)atoi(port);

0 commit comments

Comments
 (0)