From c38884ceaca3b0be250d28b3a9e842328cde7d90 Mon Sep 17 00:00:00 2001 From: Eiichi Sato Date: Wed, 6 Aug 2014 14:48:30 +0900 Subject: [PATCH] Sentinel: fix bufsize to support IPv6 address Closes #1914 --- src/sentinel.c | 4 ++-- 1 file 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 */ 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")