Browse Source

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
Daniel-Constantin Mierla 11 năm trước cách đây
mục cha
commit
8bde82a2b8
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      modules/tm/tm.c

+ 1 - 1
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)