From ece95b2deae80409596bbb0e5502f1ed778cd1d8 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 f037e6dc..8fd86622 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. */ -- GitLab