提交 90c7d8cf 编写于 作者: A antirez

Make sure buffer is enough in clusterSendPing().

上级 c147cd84
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册