uint16_t msg_size = ntohs (msg->header.size);
struct GNUNET_PeerIdentity *relays = (struct GNUNET_PeerIdentity *) &msg[1];
uint32_t relay_count = ntohl (msg->relay_count);
+ if (relay_count > MAX_RELAY_COUNT) return GNUNET_SYSERR;
uint16_t relay_size = relay_count * sizeof (*relays);
struct GNUNET_MessageHeader *join_msg = NULL;
uint16_t join_msg_size = 0;
#include "platform.h"
#include "gnunet_multicast_service.h"
+/* FIXME: What is a reasonable value here?
+ * Should it be in an include file that clients can also see?
+ */
+#define MAX_RELAY_COUNT 123
+
GNUNET_NETWORK_STRUCT_BEGIN