From 45efbb2efbaa11a25e7e53592ee41f971ce6babd Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 20 Jun 2016 19:55:38 +0000 Subject: [PATCH] -fix off-by-1 --- src/util/mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- 2.25.1