Module: sip-router
Branch: master
Commit: 28a8b87885e373bee8cc81985277ae718973fdfd
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=28a8b87…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Apr 9 00:15:47 2013 +0200
rr: use port.len to check for buffer overflow instead of max port len
- reported by Kevin Wojtysiak
---
modules/rr/loose.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/rr/loose.c b/modules/rr/loose.c
index 5ea4aa3..64fb035 100644
--- a/modules/rr/loose.c
+++ b/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;