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

Author: Peter Dunkley <[email protected]>
Committer: Peter Dunkley <[email protected]>
Date:   Wed Feb 20 09:59:56 2013 +0000

modules/outbound: Fix core dump crash

- Reported by oej

---

 modules/outbound/ob_mod.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/outbound/ob_mod.c b/modules/outbound/ob_mod.c
index caf10f4..775d0b6 100644
--- a/modules/outbound/ob_mod.c
+++ b/modules/outbound/ob_mod.c
@@ -294,7 +294,8 @@ int use_outbound(struct sip_msg *msg)
 
        /* Look for ;reg-id in REGISTER Contact-URIs and ;ob in any
           Contact-URIs */
-       if (msg->contact || parse_headers(msg, HDR_CONTACT_F, 0) != -1)
+       if (msg->contact
+               || (parse_headers(msg, HDR_CONTACT_F, 0) != -1 && msg->contact))
        {
                if (parse_contact(msg->contact) < 0)
                {
@@ -324,7 +325,8 @@ int use_outbound(struct sip_msg *msg)
        }
 
        /* Check to see if the top Route-URI is me and has a ;ob parameter */
-       if (msg->route || parse_headers(msg, HDR_ROUTE_F, 0) != -1)
+       if (msg->route
+               || (parse_headers(msg, HDR_ROUTE_F, 0) != -1 && msg->route))
        {
                if (parse_rr(msg->route) < 0)
                {


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

Reply via email to