From 5c5ebb0b9a70d428f982ed7aec5d5a60de605e42 Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 10 Jul 2013 14:44:38 +0200 Subject: [PATCH] Sentinel: make sure published addr/id buffer is large enough. With ipv6 support we need more space, so we account for the IP address max size plus what we need for the Run ID, port, flags. --- src/sentinel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sentinel.c b/src/sentinel.c index eb729966a..594b7e498 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -1839,7 +1839,7 @@ void sentinelPingInstance(sentinelRedisInstance *ri) { /* PUBLISH hello messages only to masters. */ char ip[REDIS_IP_STR_LEN]; if (anetSockName(ri->cc->c.fd,ip,sizeof(ip),NULL) != -1) { - char myaddr[128]; + char myaddr[REDIS_IP_STR_LEN+128]; // FIXME: IPv6 will break this due to nested : characters -geoffgarside snprintf(myaddr,sizeof(myaddr),"%s:%d:%s:%d",