From f8dc249de214522bbde13f98c490fb15f0519def Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 8 Jul 2016 18:20:41 +0000 Subject: [PATCH] -fix 0-termination --- src/util/mq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/mq.c b/src/util/mq.c index 9709fb6c8..8a46414d2 100644 --- a/src/util/mq.c +++ b/src/util/mq.c @@ -827,11 +827,11 @@ GNUNET_MQ_queue_for_connection_client (struct GNUNET_CLIENT_Connection *connecti 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); GNUNET_memcpy (mq->handlers, - handlers, - i * sizeof (struct GNUNET_MQ_MessageHandler)); + handlers, + i * sizeof (struct GNUNET_MQ_MessageHandler)); } mq->error_handler = error_handler; mq->error_handler_cls = error_handler_cls; -- 2.25.1