提交 f7b5e2d1 编写于 作者: E Eiichi Sato 提交者: antirez

Sentinel: fix bufsize to support IPv6 address

Closes #1914
上级 32a94bec
......@@ -456,7 +456,7 @@ void sentinelIsRunning(void) {
* EINVAL: Invalid port number.
*/
sentinelAddr *createSentinelAddr(char *hostname, int port) {
char buf[32];
char buf[REDIS_IP_STR_LEN];
sentinelAddr *sa;
if (port <= 0 || port > 65535) {
......@@ -2690,7 +2690,7 @@ void sentinelCommand(redisClient *c) {
/* SENTINEL MONITOR <name> <ip> <port> <quorum> */
sentinelRedisInstance *ri;
long quorum, port;
char buf[32];
char buf[REDIS_IP_STR_LEN];
if (c->argc != 6) goto numargserr;
if (getLongFromObjectOrReply(c,c->argv[5],&quorum,"Invalid quorum")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册