[sr-dev] git:master: tm: check the length of uri param for t_replicate

Daniel-Constantin Mierla miconda at gmail.com
Fri Jul 25 13:01:28 CEST 2014


Module: sip-router
Branch: master
Commit: 8bde82a2b85d22caf6d0cc36be2a1736ff1aad21
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8bde82a2b85d22caf6d0cc36be2a1736ff1aad21

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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)




More information about the sr-dev mailing list