Module: sip-router
Branch: 4.1
Commit: 26fd1d2fd24a1f4ee160ba24e2670b8e7a4e8176
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=26fd1d2…
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)
---
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;