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

Author: Anca Vamanu <[email protected]>
Committer: Anca Vamanu <[email protected]>
Date:   Wed Apr 25 14:55:54 2012 +0300

modules_k/presence Safety check for malformed Subscribe

        Subscribe with header 'Contact: *' caused crash in presence.

---

 modules_k/presence/subscribe.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/modules_k/presence/subscribe.c b/modules_k/presence/subscribe.c
index 19192fe..161a2a0 100644
--- a/modules_k/presence/subscribe.c
+++ b/modules_k/presence/subscribe.c
@@ -1115,6 +1115,12 @@ int extract_sdialog_info(subs_t* subs,struct sip_msg* 
msg, int mexp,
                LM_ERR("cannot parse contact header\n");
                goto error;
        }
+       if(b->star || b->contacts==NULL)
+       {
+               LM_ERR("Wrong contact header\n");
+               goto error;
+       }
+
        subs->contact = b->contacts->uri;
        
        LM_DBG("subs->contact= %.*s - len = %d\n",subs->contact.len,


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

Reply via email to