Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
2c6dc9f1
Commit
2c6dc9f1
authored
Dec 15, 2014
by
antirez
Browse files
Make sure buffer is enough in clusterSendPing().
parent
722faed6
Changes
1
Show whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
2c6dc9f1
...
@@ -2071,7 +2071,7 @@ void clusterBuildMessageHdr(clusterMsg *hdr, int type) {
...
@@ -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
/* Send a PING or PONG packet to the specified node, making sure to add enough
* gossip informations. */
* gossip informations. */
void
clusterSendPing
(
clusterLink
*
link
,
int
type
)
{
void
clusterSendPing
(
clusterLink
*
link
,
int
type
)
{
unsigned
char
buf
[
sizeof
(
clusterMsg
)];
unsigned
char
buf
[
sizeof
(
clusterMsg
)
+
sizeof
(
clusterMsgDataGossip
)
*
3
];
clusterMsg
*
hdr
=
(
clusterMsg
*
)
buf
;
clusterMsg
*
hdr
=
(
clusterMsg
*
)
buf
;
int
gossipcount
=
0
,
totlen
;
int
gossipcount
=
0
,
totlen
;
/* freshnodes is the number of nodes we can still use to populate the
/* freshnodes is the number of nodes we can still use to populate the
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment