소스 검색

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)