Skip to content

Commit

Permalink
siputils: allocate enough space to hold ending zero for tel uri in te…
Browse files Browse the repository at this point in the history
…l2sip()

- reported by Juha Heinanen

(cherry picked from commit 7992a2b8d42bb7e8bcf1738cf042013ed126a47a)
(cherry picked from commit f44415eee52d5c17a9b6c5e16175bd84455e9867)
  • Loading branch information
miconda committed May 15, 2014
1 parent bcd94bc commit b0433ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/siputils/checks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b0433ee

Please sign in to comment.