Module: sip-router Branch: 4.1 Commit: f44415eee52d5c17a9b6c5e16175bd84455e9867 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f44415eee52d5c17a9b6c5e16175bd84455e9867
Author: Daniel-Constantin Mierla <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: Thu May 15 13:59:03 2014 +0200 siputils: allocate enough space to hold ending zero for tel uri in tel2sip() - reported by Juha Heinanen (cherry picked from commit 7992a2b8d42bb7e8bcf1738cf042013ed126a47a) --- modules/siputils/checks.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/modules/siputils/checks.c b/modules/siputils/checks.c index a1a9344..7f50cfc 100644 --- a/modules/siputils/checks.c +++ b/modules/siputils/checks.c @@ -354,7 +354,7 @@ int tel2sip(struct sip_msg* _msg, char* _uri, char* _hostpart, char* _res) if (strncasecmp(uri.s, "tel:", 4) != 0) return 1; /* reserve memory for clean tel uri */ - tel_uri.s = pkg_malloc(uri.len); + tel_uri.s = pkg_malloc(uri.len+1); if (tel_uri.s == 0) { LM_ERR("no more pkg memory\n"); return -1; _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
