diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-07-08 18:20:41 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-07-08 18:20:41 +0000 |
commit | f8dc249de214522bbde13f98c490fb15f0519def (patch) | |
tree | 1e069dbbb40d5e103fef0f29559ad84ad8f7729e /src | |
parent | b2bdeca1c78a40abb2f2295c48a31f92e6e32ec0 (diff) | |
download | gnunet-f8dc249de214522bbde13f98c490fb15f0519def.tar.gz gnunet-f8dc249de214522bbde13f98c490fb15f0519def.zip |
-fix 0-termination
Diffstat (limited to 'src')
-rw-r--r-- | src/util/mq.c | 6 |
1 files 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 | |||
827 | if (NULL != handlers) | 827 | if (NULL != handlers) |
828 | { | 828 | { |
829 | for (i=0;NULL != handlers[i].cb; i++) ; | 829 | for (i=0;NULL != handlers[i].cb; i++) ; |
830 | mq->handlers = GNUNET_new_array (i, | 830 | mq->handlers = GNUNET_new_array (i + 1, |
831 | struct GNUNET_MQ_MessageHandler); | 831 | struct GNUNET_MQ_MessageHandler); |
832 | GNUNET_memcpy (mq->handlers, | 832 | GNUNET_memcpy (mq->handlers, |
833 | handlers, | 833 | handlers, |
834 | i * sizeof (struct GNUNET_MQ_MessageHandler)); | 834 | i * sizeof (struct GNUNET_MQ_MessageHandler)); |
835 | } | 835 | } |
836 | mq->error_handler = error_handler; | 836 | mq->error_handler = error_handler; |
837 | mq->error_handler_cls = error_handler_cls; | 837 | mq->error_handler_cls = error_handler_cls; |