Module: kamailio Branch: master Commit: 38bcfb75d3dfc5492fdee9e9bbb17f44cce37684 URL: https://github.com/kamailio/kamailio/commit/38bcfb75d3dfc5492fdee9e9bbb17f44cce37684
Author: Daniel-Constantin Mierla <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> 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/38bcfb75d3dfc5492fdee9e9bbb17f44cce37684.diff Patch: https://github.com/kamailio/kamailio/commit/38bcfb75d3dfc5492fdee9e9bbb17f44cce37684.patch --- 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; } _______________________________________________ Kamailio (SER) - Development Mailing List [email protected] https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
