Module: sip-router
Branch: 4.0
Commit: b2b26c811a7275dbdba90236f3cfc874fd117681
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b2b26c811a7275dbdba90236f3cfc874fd117681

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
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
(cherry picked from commit 28a8b87885e373bee8cc81985277ae718973fdfd)

---

 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 268522c..ccd08d9 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;


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to