From: Philipp Tölke Date: Wed, 15 Jun 2011 07:15:46 +0000 (+0000) Subject: Do not send too big mesh-hello-messages X-Git-Tag: initial-import-from-subversion-38251~18172 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=995c6a248f7254183abf347846cad0c37de03895;p=oweals%2Fgnunet.git Do not send too big mesh-hello-messages --- diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c index 125ca0500..996c8303c 100644 --- a/src/mesh/mesh_api.c +++ b/src/mesh/mesh_api.c @@ -188,6 +188,8 @@ send_hello_message (void *cls, size_t size, void *buf) size_t sent = sizeof(struct GNUNET_MessageHeader) + handle->hello_message_size; + if (sent > size) return 0; + hdr->type = htons(GNUNET_MESSAGE_TYPE_MESH_HELLO); hdr->size = htons(size);