diff options
Diffstat (limited to 'src/multicast')
-rw-r--r-- | src/multicast/gnunet-service-multicast.c | 1 | ||||
-rw-r--r-- | src/multicast/multicast.h | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/multicast/gnunet-service-multicast.c b/src/multicast/gnunet-service-multicast.c index d01227e2c..ab7d1c5a0 100644 --- a/src/multicast/gnunet-service-multicast.c +++ b/src/multicast/gnunet-service-multicast.c | |||
@@ -1450,6 +1450,7 @@ check_client_member_join (void *cls, | |||
1450 | uint16_t msg_size = ntohs (msg->header.size); | 1450 | uint16_t msg_size = ntohs (msg->header.size); |
1451 | struct GNUNET_PeerIdentity *relays = (struct GNUNET_PeerIdentity *) &msg[1]; | 1451 | struct GNUNET_PeerIdentity *relays = (struct GNUNET_PeerIdentity *) &msg[1]; |
1452 | uint32_t relay_count = ntohl (msg->relay_count); | 1452 | uint32_t relay_count = ntohl (msg->relay_count); |
1453 | if (relay_count > MAX_RELAY_COUNT) return GNUNET_SYSERR; | ||
1453 | uint16_t relay_size = relay_count * sizeof (*relays); | 1454 | uint16_t relay_size = relay_count * sizeof (*relays); |
1454 | struct GNUNET_MessageHeader *join_msg = NULL; | 1455 | struct GNUNET_MessageHeader *join_msg = NULL; |
1455 | uint16_t join_msg_size = 0; | 1456 | uint16_t join_msg_size = 0; |
diff --git a/src/multicast/multicast.h b/src/multicast/multicast.h index aeb3c0b41..8ff6af237 100644 --- a/src/multicast/multicast.h +++ b/src/multicast/multicast.h | |||
@@ -30,6 +30,11 @@ | |||
30 | #include "platform.h" | 30 | #include "platform.h" |
31 | #include "gnunet_multicast_service.h" | 31 | #include "gnunet_multicast_service.h" |
32 | 32 | ||
33 | /* FIXME: What is a reasonable value here? | ||
34 | * Should it be in an include file that clients can also see? | ||
35 | */ | ||
36 | #define MAX_RELAY_COUNT 123 | ||
37 | |||
33 | GNUNET_NETWORK_STRUCT_BEGIN | 38 | GNUNET_NETWORK_STRUCT_BEGIN |
34 | 39 | ||
35 | 40 | ||