From 6f15b032955299d3c38915e9e1a81078bf66743e Mon Sep 17 00:00:00 2001 From: Razvan Crainea Date: Fri, 8 Mar 2019 18:33:23 +0200 Subject: [PATCH] FS-11696 [mod_amqp] fix format_fields initialization --- src/mod/event_handlers/mod_amqp/mod_amqp_producer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod/event_handlers/mod_amqp/mod_amqp_producer.c b/src/mod/event_handlers/mod_amqp/mod_amqp_producer.c index 305b366ddb..d4479b1752 100644 --- a/src/mod/event_handlers/mod_amqp/mod_amqp_producer.c +++ b/src/mod/event_handlers/mod_amqp/mod_amqp_producer.c @@ -175,7 +175,7 @@ switch_status_t mod_amqp_producer_create(char *name, switch_xml_t cfg) char *format_fields[MAX_ROUTING_KEY_FORMAT_FIELDS+1]; int format_fields_size = 0; - memset(format_fields, 0, MAX_ROUTING_KEY_FORMAT_FIELDS + 1); + memset(format_fields, 0, (MAX_ROUTING_KEY_FORMAT_FIELDS + 1) * sizeof(char *)); if (switch_core_new_memory_pool(&pool) != SWITCH_STATUS_SUCCESS) { goto err;