Make sure buffer is enough in clusterSendPing().

This commit is contained in:
antirez committed 2014-12-15 10:18:22 +01:00
1 parent f2f7684484
commit 655c0b46ff
1 file changed
+1 -1
+1 -1
View File
@@ -2073,7 +2073,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