Skip to content

Commit

Permalink
Sentinel: fix bufsize to support IPv6 address
Browse files Browse the repository at this point in the history
Closes #1914
  • Loading branch information
eiiches authored and antirez committed Aug 26, 2014
1 parent ef2cb6c commit 4e062ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sentinel.c
Expand Up @@ -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) {
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 4e062ec

Please sign in to comment.