mirror of
https://github.com/fluencelabs/redis
synced 2025-05-01 21:42:13 +00:00
Cluster: initialized not used fileds in gossip section.
Otherwise we risk sending not initialized data to other nodes, that may contain anything. This was actually not possible only because the initialization of the buffer where the cluster packets header is created was larger than the 3 gossip sections we use, so the memory was already all filled with zeroes by the memset().
This commit is contained in:
parent
147df6f035
commit
f2cd2fcdb7
@ -2195,6 +2195,8 @@ void clusterSendPing(clusterLink *link, int type) {
|
||||
memcpy(gossip->ip,this->ip,sizeof(this->ip));
|
||||
gossip->port = htons(this->port);
|
||||
gossip->flags = htons(this->flags);
|
||||
gossip->notused1 = 0;
|
||||
gossip->notused2 = 0;
|
||||
gossipcount++;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user