From 995c6a248f7254183abf347846cad0c37de03895 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Philipp=20T=C3=B6lke?= Date: Wed, 15 Jun 2011 07:15:46 +0000 Subject: [PATCH] Do not send too big mesh-hello-messages --- src/mesh/mesh_api.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.25.1