aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-06-25 21:08:55 +0000
committerChristian Grothoff <christian@grothoff.org>2010-06-25 21:08:55 +0000
commit537903a8dc4c3ecf2dfa382af0289ddf890adfc7 (patch)
tree93e448c15c843861bd5dfe86c7cad3245abedfe7 /src/core
parent2b61888a0bf1d41b2b25256ca9834c3040551ce9 (diff)
downloadgnunet-537903a8dc4c3ecf2dfa382af0289ddf890adfc7.tar.gz
gnunet-537903a8dc4c3ecf2dfa382af0289ddf890adfc7.zip
fixing common off-by-one error with respect to maximum message size
Diffstat (limited to 'src/core')
-rw-r--r--src/core/gnunet-service-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c
index a181ae5bb..5a223d70b 100644
--- a/src/core/gnunet-service-core.c
+++ b/src/core/gnunet-service-core.c
@@ -1717,7 +1717,7 @@ batch_message (struct Neighbour *n,
1717 struct GNUNET_TIME_Relative *retry_time, 1717 struct GNUNET_TIME_Relative *retry_time,
1718 unsigned int *priority) 1718 unsigned int *priority)
1719{ 1719{
1720 char ntmb[GNUNET_SERVER_MAX_MESSAGE_SIZE]; 1720 char ntmb[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1];
1721 struct NotifyTrafficMessage *ntm = (struct NotifyTrafficMessage*) ntmb; 1721 struct NotifyTrafficMessage *ntm = (struct NotifyTrafficMessage*) ntmb;
1722 struct MessageEntry *pos; 1722 struct MessageEntry *pos;
1723 struct MessageEntry *prev; 1723 struct MessageEntry *prev;
@@ -3824,7 +3824,7 @@ run (void *cls,
3824 &handle_transport_notify_disconnect); 3824 &handle_transport_notify_disconnect);
3825 GNUNET_assert (NULL != transport); 3825 GNUNET_assert (NULL != transport);
3826 stats = GNUNET_STATISTICS_create (sched, "core", cfg); 3826 stats = GNUNET_STATISTICS_create (sched, "core", cfg);
3827 mst = GNUNET_SERVER_mst_create (GNUNET_SERVER_MAX_MESSAGE_SIZE, 3827 mst = GNUNET_SERVER_mst_create (GNUNET_SERVER_MAX_MESSAGE_SIZE - 1,
3828 &deliver_message, 3828 &deliver_message,
3829 NULL); 3829 NULL);
3830 GNUNET_SCHEDULER_add_delayed (sched, 3830 GNUNET_SCHEDULER_add_delayed (sched,