From ecdbaf4695e55a59e5f9425e7c603507b2017f49 Mon Sep 17 00:00:00 2001 From: xiaost7 Date: Fri, 19 Apr 2013 12:42:22 +0800 Subject: [PATCH] Cluster: fix clusterNode.name print format on debug message. It was %40s instead of %.40s, and since the string is not null terminated it caused random garbage to be displayed, and possibly a crash. --- src/cluster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cluster.c b/src/cluster.c index 9043a4ba..23e7cbee 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -1548,7 +1548,7 @@ void clusterCron(void) { } } if (min_ping_node) { - redisLog(REDIS_DEBUG,"Pinging node %40s", min_ping_node->name); + redisLog(REDIS_DEBUG,"Pinging node %.40s", min_ping_node->name); clusterSendPing(min_ping_node->link, CLUSTERMSG_TYPE_PING); }