diff options
author | Eiichi Sato <sato.eiichi@gmail.com> | 2014-08-06 14:48:30 +0900 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-08-25 10:15:43 +0200 |
commit | c38884ceaca3b0be250d28b3a9e842328cde7d90 (patch) | |
tree | c5d5374174f0c4d65215f49424d242c39611b901 | |
parent | ef57f94df0c07ccdd61e537283f45f977840f8ad (diff) | |
download | redis-c38884ceaca3b0be250d28b3a9e842328cde7d90.tar.gz |
Sentinel: fix bufsize to support IPv6 address
Closes #1914
-rw-r--r-- | src/sentinel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sentinel.c b/src/sentinel.c index 61ca3000a..e8630a9a8 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -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") |