Module: kamailio
Branch: master
Commit: 38bcfb75d3dfc5492fdee9e9bbb17f44cce37684
URL:
https://github.com/kamailio/kamailio/commit/38bcfb75d3dfc5492fdee9e9bbb17f4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-09-16T09:13:28+02:00
tm: safety check when using r-uri for generating from tag
- it can come from functions exported via tm api and the r-uri can be
optional because there are other checks if it is null or not
---
Modified: src/modules/tm/uac.c
---
Diff:
https://github.com/kamailio/kamailio/commit/38bcfb75d3dfc5492fdee9e9bbb17f4…
Patch:
https://github.com/kamailio/kamailio/commit/38bcfb75d3dfc5492fdee9e9bbb17f4…
---
diff --git a/src/modules/tm/uac.c b/src/modules/tm/uac.c
index e80b4ad62e..2de8d29f27 100644
--- a/src/modules/tm/uac.c
+++ b/src/modules/tm/uac.c
@@ -110,7 +110,9 @@ void generate_fromtag(str* tag, str* callid, str* ruri)
{
/* calculate from tag from callid and request uri */
crcitt_string_array(&from_tag[MD5_LEN + 1], callid, 1);
- crcitt_string_array(&from_tag[MD5_LEN + 5], ruri, 1);
+ if(ruri) {
+ crcitt_string_array(&from_tag[MD5_LEN + 5], ruri, 1);
+ }
tag->s = from_tag;
tag->len = FROM_TAG_LEN;
}