فهرست منبع

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

    - reported by Kevin Wojtysiak
    (from commit 28a8b87885e373bee8cc81985277ae718973fdfd)
Henning Westerholt 12 سال پیش
والد
کامیت
91d231b85a
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      modules_k/rr/loose.c

+ 1 - 1
modules_k/rr/loose.c

@@ -363,7 +363,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;