Module: sip-router
Branch: master
Commit: 8bde82a2b85d22caf6d0cc36be2a1736ff1aad21
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8bde82a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Jul 25 13:00:16 2014 +0200
tm: check the length of uri param for t_replicate
- if emtpty string is given, then parameter is ignored and address of
next hop is taken from r-uri or dst-uri
---
modules/tm/tm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/tm/tm.c b/modules/tm/tm.c
index 48076f3..5b92055 100644
--- a/modules/tm/tm.c
+++ b/modules/tm/tm.c
@@ -1610,7 +1610,7 @@ int t_replicate_uri(struct sip_msg *msg, str *suri)
struct sip_uri turi;
int r = -1;
- if (suri != NULL && suri->s != NULL)
+ if (suri != NULL && suri->s != NULL && suri->len > 0)
{
memset(&turi, 0, sizeof(struct sip_uri));
if(parse_uri(suri->s, suri->len, &turi)!=0)