瀏覽代碼

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 年之前
父節點
當前提交
8bde82a2b8
共有 1 個文件被更改,包括 1 次插入1 次删除
  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)