From: Christian Grothoff Date: Mon, 20 Jun 2016 19:55:38 +0000 (+0000) Subject: -fix off-by-1 X-Git-Tag: initial-import-from-subversion-38251~756 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=45efbb2efbaa11a25e7e53592ee41f971ce6babd;p=oweals%2Fgnunet.git -fix off-by-1 --- diff --git a/src/util/mq.c b/src/util/mq.c index 33bc077c1..b46e36ddf 100644 --- a/src/util/mq.c +++ b/src/util/mq.c @@ -395,7 +395,7 @@ GNUNET_MQ_queue_for_callbacks (GNUNET_MQ_SendImpl send, if (NULL != handlers) { for (i=0;NULL != handlers[i].cb; i++) ; - mq->handlers = GNUNET_new_array (i, + mq->handlers = GNUNET_new_array (i + 1, struct GNUNET_MQ_MessageHandler); memcpy (mq->handlers, handlers,