From 2d8f61d2455161a2db1d7e39bbbb6600b2cb8cbc Mon Sep 17 00:00:00 2001 From: Chris Rienzo Date: Thu, 8 May 2014 11:33:27 -0400 Subject: [PATCH] CID: 1211947 mod_rayo - allocated array with unsigned char * element size instead of unsigned char --- src/mod/event_handlers/mod_rayo/iks_helpers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod/event_handlers/mod_rayo/iks_helpers.c b/src/mod/event_handlers/mod_rayo/iks_helpers.c index 93be6db3a2..4a290b9130 100644 --- a/src/mod/event_handlers/mod_rayo/iks_helpers.c +++ b/src/mod/event_handlers/mod_rayo/iks_helpers.c @@ -1,6 +1,6 @@ /* * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2013, Grasshopper + * Copyright (C) 2013-2014, Grasshopper * * Version: MPL 1.1 * @@ -512,7 +512,7 @@ char *iks_server_dialback_key(const char *secret, const char *receiving_server, if (!zstr(secret) && !zstr(receiving_server) && !zstr(originating_server) && !zstr(stream_id)) { unsigned char secret_hash[IKS_SHA256_HEX_DIGEST_LENGTH]; unsigned char *message = NULL; - unsigned char *dialback_key = malloc(sizeof(unsigned char *) * IKS_SHA256_HEX_DIGEST_LENGTH); + unsigned char *dialback_key = malloc(sizeof(unsigned char) * IKS_SHA256_HEX_DIGEST_LENGTH); iks_sha256_hex_string((unsigned char *)secret, strlen(secret), secret_hash); message = (unsigned char *)switch_mprintf("%s %s %s", receiving_server, originating_server, stream_id); iks_hmac_sha256_hex_string(secret_hash, strlen((char *)secret_hash), message, strlen((char *)message), dialback_key);