From 2c6dc9f15ff7e84fa924f73f3a7b3b81f4b17aca Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 15 Dec 2014 10:18:22 +0100 Subject: [PATCH] Make sure buffer is enough in clusterSendPing(). --- src/cluster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cluster.c b/src/cluster.c index 80ac66e4..15483ff8 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -2071,7 +2071,7 @@ void clusterBuildMessageHdr(clusterMsg *hdr, int type) { /* Send a PING or PONG packet to the specified node, making sure to add enough * gossip informations. */ void clusterSendPing(clusterLink *link, int type) { - unsigned char buf[sizeof(clusterMsg)]; + unsigned char buf[sizeof(clusterMsg)+sizeof(clusterMsgDataGossip)*3]; clusterMsg *hdr = (clusterMsg*) buf; int gossipcount = 0, totlen; /* freshnodes is the number of nodes we can still use to populate the