From 9975fac7bb6d40ae2d995c5adb249b7def92c3cc Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 13 Mar 2013 17:31:19 +0100 Subject: [PATCH] Cluster: sanity check FAILOVER_AUTH_REQUEST messages for proper length. --- src/cluster.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cluster.c b/src/cluster.c index f037e6dc4..8fd866220 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -793,6 +793,10 @@ int clusterProcessPacket(clusterLink *link) { ntohl(hdr->data.publish.msg.channel_len) + ntohl(hdr->data.publish.msg.message_len); if (totlen != explen) return 1; + } else if (type == CLUSTERMSG_TYPE_FAILOVER_AUTH_REQUEST) { + uint32_t explen = sizeof(clusterMsg)-sizeof(union clusterMsgData); + + if (totlen != explen) return 1; } /* Ready to process the packet. Dispatch by type. */