Explorar o código

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 %!s(int64=11) %!d(string=hai) anos
pai
achega
8bde82a2b8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)