From 8a1843d0467591bd77679d7c5135d0ca8f3c3067 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Wed, 19 Dec 2012 13:02:12 +0000 Subject: [PATCH] -do not permit queueing of messages that are too big --- src/core/core_api.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/core_api.c b/src/core/core_api.c index d2f5119ac..ffddc73b2 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c @@ -1286,6 +1286,11 @@ GNUNET_CORE_notify_transmit_ready (struct GNUNET_CORE_Handle *handle, int cork, struct PeerRecord *pr; struct GNUNET_CORE_TransmitHandle *th; + if (notify_size > GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE) + { + GNUNET_break (0); + return NULL; + } GNUNET_assert (NULL != notify); LOG (GNUNET_ERROR_TYPE_DEBUG, "Asking core for transmission of %u bytes to `%s'\n", -- 2.25.1