aboutsummaryrefslogtreecommitdiff
path: root/src/multicast
diff options
context:
space:
mode:
Diffstat (limited to 'src/multicast')
-rw-r--r--src/multicast/multicast_api.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/multicast/multicast_api.c b/src/multicast/multicast_api.c
index 40fb6cc33..6b784c2f0 100644
--- a/src/multicast/multicast_api.c
+++ b/src/multicast/multicast_api.c
@@ -361,14 +361,13 @@ schedule_origin_to_all (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc
361 struct GNUNET_MULTICAST_Origin *orig = cls; 361 struct GNUNET_MULTICAST_Origin *orig = cls;
362 struct GNUNET_MULTICAST_OriginMessageHandle *mh = &orig->msg_handle; 362 struct GNUNET_MULTICAST_OriginMessageHandle *mh = &orig->msg_handle;
363 363
364 size_t buf_size = GNUNET_MULTICAST_FRAGMENT_MAX_SIZE; 364 size_t buf_size = GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD;
365 struct GNUNET_MULTICAST_MessageHeader *msg 365 struct GNUNET_MULTICAST_MessageHeader *msg
366 = GNUNET_malloc (buf_size); 366 = GNUNET_malloc (buf_size);
367 buf_size -= sizeof (*msg);
368 int ret = mh->notify (mh->notify_cls, &buf_size, &msg[1]); 367 int ret = mh->notify (mh->notify_cls, &buf_size, &msg[1]);
369 368
370 if (! (GNUNET_YES == ret || GNUNET_NO == ret) 369 if (! (GNUNET_YES == ret || GNUNET_NO == ret)
371 || sizeof (*msg) + buf_size > GNUNET_MULTICAST_FRAGMENT_MAX_SIZE) 370 || GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD < buf_size)
372 { 371 {
373 LOG (GNUNET_ERROR_TYPE_ERROR, 372 LOG (GNUNET_ERROR_TYPE_ERROR,
374 "MasterTransmitNotify() returned error or invalid message size.\n"); 373 "MasterTransmitNotify() returned error or invalid message size.\n");