Browse Source

rr: use port.len to check for buffer overflow instead of max port len

- reported by Kevin Wojtysiak
Daniel-Constantin Mierla 12 năm trước cách đây
mục cha
commit
28a8b87885
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      modules/rr/loose.c

+ 1 - 1
modules/rr/loose.c

@@ -367,7 +367,7 @@ static inline int get_maddr_uri(str *uri, struct sip_uri *puri)
 		return 0;
 
 	/* sip: + maddr + : + port */
-	if( (puri->maddr_val.len) > (127 - 10) )
+	if( (puri->maddr_val.len) > (127 - 6 - puri->port.len) )
 	{
 		LM_ERR( "Too long maddr parameter\n");
 		return RR_ERROR;