Module: sip-router
Branch: 4.0
Commit: be06910670a08d4a6e1078f579477d86fc915334
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=be06910…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Feb 24 21:32:45 2014 +0100
nat_traversal: proper size for realloc
- reported by Venky
(cherry picked from commit d9c34bec5ea0570f66df23e7e7d6f79f4721f04e)
(cherry picked from commit 26fd1d2fd24a1f4ee160ba24e2670b8e7a4e8176)
---
modules/nat_traversal/nat_traversal.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/nat_traversal/nat_traversal.c
b/modules/nat_traversal/nat_traversal.c
index 3368689..92ddd4c 100644
--- a/modules/nat_traversal/nat_traversal.c
+++ b/modules/nat_traversal/nat_traversal.c
@@ -685,7 +685,7 @@ Dialog_Param_add_candidate(Dialog_Param *param, char *candidate)
if (param->callee_candidates.count == param->callee_candidates.size) {
new_size = param->callee_candidates.size + URI_LIST_RESIZE_INCREMENT;
LM_DBG("growing callee_candidates list size from %d to %d entries\n",
param->callee_candidates.size, new_size);
- new_uri = shm_realloc(param->callee_candidates.uri, new_size);
+ new_uri = shm_realloc(param->callee_candidates.uri, new_size *
sizeof(char*));
if (!new_uri) {
LM_ERR("failed to grow callee_candidates uri list\n");
return False;